Similarly as for ice driver [1] there are also circular header
dependencies in i40e driver:
i40e.h -> i40e_virtchnl_pf.h -> i40e.h
Another issue is that i40e header files does not contain their own
dependencies on other header files (both private and standard) so their
inclusion in .c file require to add these deps in certain order to
that .c file to make it compilable.
Fix both issues by removal the mentioned circular dependency, by filling
i40e headers with their dependencies so they can be placed anywhere in
a source code. Additionally remove bunch of includes from i40e.h super
header file that are not necessary and include i40e.h only in .c files
that really require it.
[1] 649c87c6ff
("ice: remove circular header dependencies on ice.h")
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
31 lines
830 B
C
31 lines
830 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright(c) 2013 - 2018 Intel Corporation. */
|
|
|
|
#ifndef _I40E_DIAG_H_
|
|
#define _I40E_DIAG_H_
|
|
|
|
#include "i40e_adminq_cmd.h"
|
|
|
|
/* forward-declare the HW struct for the compiler */
|
|
struct i40e_hw;
|
|
|
|
enum i40e_lb_mode {
|
|
I40E_LB_MODE_NONE = 0x0,
|
|
I40E_LB_MODE_PHY_LOCAL = I40E_AQ_LB_PHY_LOCAL,
|
|
I40E_LB_MODE_PHY_REMOTE = I40E_AQ_LB_PHY_REMOTE,
|
|
I40E_LB_MODE_MAC_LOCAL = I40E_AQ_LB_MAC_LOCAL,
|
|
};
|
|
|
|
struct i40e_diag_reg_test_info {
|
|
u32 offset; /* the base register */
|
|
u32 mask; /* bits that can be tested */
|
|
u32 elements; /* number of elements if array */
|
|
u32 stride; /* bytes between each element */
|
|
};
|
|
|
|
extern const struct i40e_diag_reg_test_info i40e_reg_list[];
|
|
|
|
int i40e_diag_reg_test(struct i40e_hw *hw);
|
|
int i40e_diag_eeprom_test(struct i40e_hw *hw);
|
|
|
|
#endif /* _I40E_DIAG_H_ */
|