Commit56df345917
("i40e: Remove circular header dependencies and fix headers") redistributed a number of includes from one large header file to the locations they were needed. In some environments, types.h is not included and causing compile issues. The driver should not rely on implicit inclusion from other locations; explicitly include it to these files. Snippet of issue. Entire log can be seen through the Closes: link. In file included from drivers/net/ethernet/intel/i40e/i40e_diag.h:7, from drivers/net/ethernet/intel/i40e/i40e_diag.c:4: drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:33:9: error: unknown type name '__le16' 33 | __le16 flags; | ^~~~~~ drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:34:9: error: unknown type name '__le16' 34 | __le16 opcode; | ^~~~~~ ... drivers/net/ethernet/intel/i40e/i40e_diag.h:22:9: error: unknown type name 'u32' 22 | u32 elements; /* number of elements if array */ | ^~~ drivers/net/ethernet/intel/i40e/i40e_diag.h:23:9: error: unknown type name 'u32' 23 | u32 stride; /* bytes between each element */ Reported-by: Martin Zaharinov <micron10@gmail.com> Closes: https://lore.kernel.org/netdev/21BBD62A-F874-4E42-B347-93087EEA8126@gmail.com/ Fixes:56df345917
("i40e: Remove circular header dependencies and fix headers") Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Arpana Arland <arpanax.arland@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://lore.kernel.org/r/20240117172534.3555162-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
32 lines
855 B
C
32 lines
855 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright(c) 2013 - 2018 Intel Corporation. */
|
|
|
|
#ifndef _I40E_DIAG_H_
|
|
#define _I40E_DIAG_H_
|
|
|
|
#include <linux/types.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_ */
|