1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018-2021 Beijing WangXun Technology Co., Ltd.
3 * Copyright(c) 2010-2017 Intel Corporation
9 #define NGBE_FRAME_SIZE_DFT (1522) /* Default frame size, +FCS */
11 #define NGBE_ALIGN 128 /* as intel did */
12 #define NGBE_ISB_SIZE 16
14 #include "ngbe_status.h"
15 #include "ngbe_osdep.h"
16 #include "ngbe_devids.h"
18 struct ngbe_thermal_diode_data {
24 struct ngbe_thermal_sensor_data {
25 struct ngbe_thermal_diode_data sensor[1];
28 enum ngbe_eeprom_type {
29 ngbe_eeprom_unknown = 0,
32 ngbe_eeprom_none /* No NVM support */
54 enum ngbe_media_type {
55 ngbe_media_type_unknown = 0,
56 ngbe_media_type_fiber,
57 ngbe_media_type_fiber_qsfp,
58 ngbe_media_type_copper,
59 ngbe_media_type_backplane,
61 ngbe_media_type_virtual
67 struct ngbe_bus_info {
68 void (*set_lan_id)(struct ngbe_hw *hw);
74 struct ngbe_rom_info {
75 s32 (*init_params)(struct ngbe_hw *hw);
76 s32 (*validate_checksum)(struct ngbe_hw *hw, u16 *checksum_val);
78 enum ngbe_eeprom_type type;
88 struct ngbe_mac_info {
89 s32 (*init_hw)(struct ngbe_hw *hw);
90 s32 (*reset_hw)(struct ngbe_hw *hw);
91 s32 (*stop_hw)(struct ngbe_hw *hw);
92 s32 (*acquire_swfw_sync)(struct ngbe_hw *hw, u32 mask);
93 void (*release_swfw_sync)(struct ngbe_hw *hw, u32 mask);
95 /* Manageability interface */
96 s32 (*init_thermal_sensor_thresh)(struct ngbe_hw *hw);
98 enum ngbe_mac_type type;
101 struct ngbe_thermal_sensor_data thermal_sensor_data;
105 struct ngbe_phy_info {
106 enum ngbe_media_type media_type;
107 enum ngbe_phy_type type;
113 struct ngbe_mac_info mac;
114 struct ngbe_phy_info phy;
115 struct ngbe_rom_info rom;
116 struct ngbe_bus_info bus;
121 bool adapter_stopped;
129 #include "ngbe_regs.h"
130 #include "ngbe_dummy.h"
132 #endif /* _NGBE_TYPE_H_ */