xref: /linux/drivers/net/ethernet/intel/i40e/i40e_diag.h (revision 24b10e5f8e0d2bee1a10fc67011ea5d936c1a389)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright(c) 2013 - 2018 Intel Corporation. */
3 
4 #ifndef _I40E_DIAG_H_
5 #define _I40E_DIAG_H_
6 
7 #include <linux/types.h>
8 #include "i40e_adminq_cmd.h"
9 
10 /* forward-declare the HW struct for the compiler */
11 struct i40e_hw;
12 
13 enum i40e_lb_mode {
14 	I40E_LB_MODE_NONE       = 0x0,
15 	I40E_LB_MODE_PHY_LOCAL  = I40E_AQ_LB_PHY_LOCAL,
16 	I40E_LB_MODE_PHY_REMOTE = I40E_AQ_LB_PHY_REMOTE,
17 	I40E_LB_MODE_MAC_LOCAL  = I40E_AQ_LB_MAC_LOCAL,
18 };
19 
20 struct i40e_diag_reg_test_info {
21 	u32 offset;	/* the base register */
22 	u32 mask;	/* bits that can be tested */
23 	u32 elements;	/* number of elements if array */
24 	u32 stride;	/* bytes between each element */
25 };
26 
27 extern const struct i40e_diag_reg_test_info i40e_reg_list[];
28 
29 int i40e_diag_reg_test(struct i40e_hw *hw);
30 int i40e_diag_eeprom_test(struct i40e_hw *hw);
31 
32 #endif /* _I40E_DIAG_H_ */
33