42#define IXGBE_X540_MAX_TX_QUEUES 128
43#define IXGBE_X540_MAX_RX_QUEUES 128
44#define IXGBE_X540_RAR_ENTRIES 128
45#define IXGBE_X540_MC_TBL_SIZE 128
46#define IXGBE_X540_VFT_TBL_SIZE 128
47#define IXGBE_X540_RX_PB_SIZE 384
200 bool autoneg_wait_to_complete)
233 "semaphore failed with %d", status);
243 for (i = 0; i < 10; i++) {
253 "Reset polling failed to complete.\n");
263 hw->
mac.
flags &= ~IXGBE_FLAGS_DOUBLE_RESET_REQUIRED;
343 DEBUGFUNC(
"ixgbe_get_supported_physical_layer_X540");
354 return physical_layer;
370 DEBUGFUNC(
"ixgbe_init_eeprom_params_X540");
382 DEBUGOUT2(
"Eeprom params: type = %d, size = %d\n",
427 DEBUGFUNC(
"ixgbe_read_eerd_buffer_X540");
478 DEBUGFUNC(
"ixgbe_write_eewr_buffer_X540");
515 DEBUGFUNC(
"ixgbe_calc_eeprom_checksum_X540");
541 if (pointer == 0xFFFF || pointer == 0 ||
551 if (length == 0xFFFF || length == 0 ||
555 for (j = pointer + 1; j <= pointer + length; j++) {
566 return (
s32)checksum;
582 u16 read_checksum = 0;
584 DEBUGFUNC(
"ixgbe_validate_eeprom_checksum_X540");
603 checksum = (
u16)(status & 0xffff);
616 if (read_checksum != checksum) {
618 "Invalid EEPROM checksum");
624 *checksum_val = checksum;
645 DEBUGFUNC(
"ixgbe_update_eeprom_checksum_X540");
664 checksum = (
u16)(status & 0xffff);
697 DEBUGOUT(
"Flash update time out\n");
706 DEBUGOUT(
"Flash update complete\n");
708 DEBUGOUT(
"Flash update time out\n");
720 DEBUGOUT(
"Flash update complete\n");
722 DEBUGOUT(
"Flash update time out\n");
741 DEBUGFUNC(
"ixgbe_poll_flash_update_done_X540");
754 "Flash update status polling timed out");
770 u32 fwmask = swmask << 5;
777 DEBUGFUNC(
"ixgbe_acquire_swfw_sync_X540");
786 swmask |= swi2c_mask;
787 fwmask |= swi2c_mask << 2;
791 for (i = 0; i < timeout; i++) {
796 DEBUGOUT(
"Failed to get NVM access and register semaphore, returning IXGBE_ERR_SWFW_SYNC\n");
801 if (!(swfw_sync & (fwmask | swmask | hwmask))) {
822 DEBUGOUT(
"Failed to get NVM semaphore and register semaphore while forcefully ignoring FW semaphore bit(s) and setting SW semaphore bit(s), returning IXGBE_ERR_SWFW_SYNC\n");
826 if (swfw_sync & (fwmask | hwmask)) {
838 if (swfw_sync & swmask) {
847 DEBUGOUT(
"Resource not released by other SW, returning IXGBE_ERR_SWFW_SYNC\n");
851 DEBUGOUT(
"Returning error IXGBE_ERR_SWFW_SYNC\n");
869 DEBUGFUNC(
"ixgbe_release_swfw_sync_X540");
876 swfw_sync &= ~swmask;
896 DEBUGFUNC(
"ixgbe_get_swfw_sync_semaphore");
899 for (i = 0; i < timeout; i++) {
914 for (i = 0; i < timeout; i++) {
928 "REGSMP Software NVM semaphore not granted.\n");
934 "Software semaphore SMBI between device drivers "
951 DEBUGFUNC(
"ixgbe_release_swfw_sync_semaphore");
956 swsm &= ~IXGBE_SWFW_REGSMP;
960 swsm &= ~IXGBE_SWSM_SMBI;
1011 DEBUGFUNC(
"ixgbe_blink_led_start_X540");
1022 if (link_up ==
false) {
1029 ledctl_reg &= ~IXGBE_LED_MODE_MASK(index);
1057 ledctl_reg &= ~IXGBE_LED_MODE_MASK(index);
1059 ledctl_reg &= ~IXGBE_LED_BLINK(index);
s32 ixgbe_set_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
s32 ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
s32 ixgbe_set_vmdq_san_mac_generic(struct ixgbe_hw *hw, u32 vmdq)
void ixgbe_set_vlan_anti_spoofing(struct ixgbe_hw *hw, bool enable, int vf)
bool ixgbe_bypass_valid_rd_generic(u32 in_reg, u32 out_reg)
void ixgbe_set_mac_anti_spoofing(struct ixgbe_hw *hw, bool enable, int vf)
s32 ixgbe_clear_vfta_generic(struct ixgbe_hw *hw)
s32 ixgbe_get_fcoe_boot_status_generic(struct ixgbe_hw *hw, u16 *bs)
s32 ixgbe_init_uta_tables_generic(struct ixgbe_hw *hw)
s32 ixgbe_bypass_rw_generic(struct ixgbe_hw *hw, u32 cmd, u32 *status)
s32 ixgbe_enable_sec_rx_path_generic(struct ixgbe_hw *hw)
s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw)
void ixgbe_set_rxpba_generic(struct ixgbe_hw *hw, int num_pb, u32 headroom, int strategy)
s32 ixgbe_bypass_set_generic(struct ixgbe_hw *hw, u32 ctrl, u32 event, u32 action)
s32 ixgbe_bypass_rd_eep_generic(struct ixgbe_hw *hw, u32 addr, u8 *value)
s32 ixgbe_get_san_mac_addr_generic(struct ixgbe_hw *hw, u8 *san_mac_addr)
void ixgbe_enable_relaxed_ordering_gen2(struct ixgbe_hw *hw)
s32 ixgbe_get_device_caps_generic(struct ixgbe_hw *hw, u16 *device_caps)
s32 ixgbe_init_ops_generic(struct ixgbe_hw *hw)
s32 ixgbe_set_vfta_generic(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on, bool vlvf_bypass)
s32 ixgbe_read_eerd_buffer_generic(struct ixgbe_hw *hw, u16 offset, u16 words, u16 *data)
void ixgbe_start_hw_gen2(struct ixgbe_hw *hw)
s32 ixgbe_set_vlvf_generic(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on, u32 *vfta_delta, u32 vfta, bool vlvf_bypass)
s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed, bool *link_up, bool link_up_wait_to_complete)
s32 ixgbe_write_eewr_generic(struct ixgbe_hw *hw, u16 offset, u16 data)
s32 ixgbe_read_eerd_generic(struct ixgbe_hw *hw, u16 offset, u16 *data)
s32 ixgbe_get_wwn_prefix_generic(struct ixgbe_hw *hw, u16 *wwnn_prefix, u16 *wwpn_prefix)
s32 ixgbe_set_fw_drv_ver_generic(struct ixgbe_hw *hw, u8 maj, u8 min, u8 build, u8 sub, u16 len, const char *driver_ver)
s32 ixgbe_set_san_mac_addr_generic(struct ixgbe_hw *hw, u8 *san_mac_addr)
s32 ixgbe_disable_sec_rx_path_generic(struct ixgbe_hw *hw)
s32 ixgbe_write_eewr_buffer_generic(struct ixgbe_hw *hw, u16 offset, u16 words, u16 *data)
s32 ixgbe_insert_mac_addr_generic(struct ixgbe_hw *hw, u8 *addr, u32 vmdq)
s32 ixgbe_validate_mac_addr(u8 *mac_addr)
u16 ixgbe_get_pcie_msix_count_generic(struct ixgbe_hw *hw)
void ixgbe_clear_tx_pending(struct ixgbe_hw *hw)
void ixgbe_dcb_get_rtrup2tc_generic(struct ixgbe_hw *hw, u8 *map)
void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw)
#define IXGBE_READ_REG(a, reg)
#define DEBUGOUT2(S, A, B)
#define ERROR_REPORT1(S, A)
#define UNREFERENCED_1PARAMETER(_p)
#define IXGBE_WRITE_FLUSH(a)
#define IXGBE_WRITE_REG(a, reg, val)
#define ERROR_REPORT2(S, A, B)
@ IXGBE_ERROR_INVALID_STATE
s32 ixgbe_get_copper_link_capabilities_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed, bool *autoneg)
s32 ixgbe_set_copper_phy_power(struct ixgbe_hw *hw, bool on)
s32 ixgbe_init_phy_ops_generic(struct ixgbe_hw *hw)
#define IXGBE_GSSR_MAC_CSR_SM
#define IXGBE_FLUDONE_ATTEMPTS
#define IXGBE_LED_BLINK(_i)
#define IXGBE_MDIO_PHY_1000BASET_ABILITY
#define IXGBE_ERR_SWFW_SYNC
#define IXGBE_MDIO_PHY_EXT_ABILITY
#define IXGBE_SWSM_BY_MAC(_hw)
#define IXGBE_RXPBSIZE_SHIFT
#define IXGBE_PHYSICAL_LAYER_10GBASE_T
#define IXGBE_PHYSICAL_LAYER_100BASE_TX
#define IXGBE_GSSR_I2C_MASK
#define IXGBE_OPTION_ROM_PTR
#define IXGBE_GSSR_FLASH_SM
#define IXGBE_FWSM_MODE_MASK
#define IXGBE_MACC_FSV_10G
#define IXGBE_PHYSICAL_LAYER_UNKNOWN
#define IXGBE_EEC_SEC1VAL
#define IXGBE_PCIE_ANALOG_PTR
#define IXGBE_GSSR_PHY1_SM
#define IXGBE_LED_MODE_SHIFT(_i)
#define IXGBE_LED_LINK_ACTIVE
#define IXGBE_FLAGS_DOUBLE_RESET_REQUIRED
#define IXGBE_RXPBSIZE(_i)
#define IXGBE_MDIO_PHY_10GBASET_ABILITY
@ ixgbe_eeprom_uninitialized
#define IXGBE_GSSR_EEP_SM
@ ixgbe_media_type_copper
#define IXGBE_GSSR_PHY0_SM
#define IXGBE_EEPROM_WORD_SIZE_SHIFT
#define IXGBE_GSSR_SW_MNG_SM
#define IXGBE_MDIO_PMA_PMD_DEV_TYPE
#define IXGBE_SWFW_REGSMP
#define IXGBE_EEC_FLUDONE
#define IXGBE_MDIO_PHY_100BASETX_ABILITY
#define IXGBE_EEC_BY_MAC(_hw)
#define IXGBE_EEPROM_CHECKSUM
#define IXGBE_FWSM_BY_MAC(_hw)
#define IXGBE_SWFW_SYNC_BY_MAC(_hw)
#define IXGBE_CTRL_RST_MASK
#define IXGBE_GSSR_NVM_PHY_MASK
#define IXGBE_PHYSICAL_LAYER_1000BASE_T
#define IXGBE_EEC_SIZE_SHIFT
#define IXGBE_CLEAR_VMDQ_ALL
#define IXGBE_ERR_RESET_FAILED
#define IXGBE_ERR_EEPROM_CHECKSUM
enum ixgbe_media_type ixgbe_get_media_type_X540(struct ixgbe_hw *hw)
s32 ixgbe_read_eerd_X540(struct ixgbe_hw *hw, u16 offset, u16 *data)
#define IXGBE_X540_RAR_ENTRIES
s32 ixgbe_write_eewr_X540(struct ixgbe_hw *hw, u16 offset, u16 data)
s32 ixgbe_acquire_swfw_sync_X540(struct ixgbe_hw *hw, u32 mask)
#define IXGBE_X540_MC_TBL_SIZE
s32 ixgbe_start_hw_X540(struct ixgbe_hw *hw)
s32 ixgbe_validate_eeprom_checksum_X540(struct ixgbe_hw *hw, u16 *checksum_val)
s32 ixgbe_update_flash_X540(struct ixgbe_hw *hw)
s32 ixgbe_reset_hw_X540(struct ixgbe_hw *hw)
static s32 ixgbe_poll_flash_update_done_X540(struct ixgbe_hw *hw)
s32 ixgbe_write_eewr_buffer_X540(struct ixgbe_hw *hw, u16 offset, u16 words, u16 *data)
s32 ixgbe_update_eeprom_checksum_X540(struct ixgbe_hw *hw)
s32 ixgbe_blink_led_start_X540(struct ixgbe_hw *hw, u32 index)
static s32 ixgbe_get_swfw_sync_semaphore(struct ixgbe_hw *hw)
static void ixgbe_release_swfw_sync_semaphore(struct ixgbe_hw *hw)
void ixgbe_init_swfw_sync_X540(struct ixgbe_hw *hw)
s32 ixgbe_init_ops_X540(struct ixgbe_hw *hw)
u64 ixgbe_get_supported_physical_layer_X540(struct ixgbe_hw *hw)
s32 ixgbe_get_link_capabilities_X540(struct ixgbe_hw *hw, ixgbe_link_speed *speed, bool *autoneg)
#define IXGBE_X540_RX_PB_SIZE
#define IXGBE_X540_VFT_TBL_SIZE
#define IXGBE_X540_MAX_TX_QUEUES
s32 ixgbe_calc_eeprom_checksum_X540(struct ixgbe_hw *hw)
s32 ixgbe_setup_mac_link_X540(struct ixgbe_hw *hw, ixgbe_link_speed speed, bool autoneg_wait_to_complete)
s32 ixgbe_blink_led_stop_X540(struct ixgbe_hw *hw, u32 index)
void ixgbe_release_swfw_sync_X540(struct ixgbe_hw *hw, u32 mask)
s32 ixgbe_read_eerd_buffer_X540(struct ixgbe_hw *hw, u16 offset, u16 words, u16 *data)
s32 ixgbe_init_eeprom_params_X540(struct ixgbe_hw *hw)
#define IXGBE_X540_MAX_RX_QUEUES
enum ixgbe_eeprom_type type
struct ixgbe_eeprom_operations ops
s32(* read_buffer)(struct ixgbe_hw *, u16, u16, u16 *)
s32(* write_buffer)(struct ixgbe_hw *, u16, u16, u16 *)
s32(* update_checksum)(struct ixgbe_hw *)
s32(* init_params)(struct ixgbe_hw *)
s32(* write)(struct ixgbe_hw *, u16, u16)
s32(* read)(struct ixgbe_hw *, u16, u16 *)
s32(* calc_checksum)(struct ixgbe_hw *)
s32(* validate_checksum)(struct ixgbe_hw *, u16 *)
struct ixgbe_mac_info mac
struct ixgbe_mbx_info mbx
struct ixgbe_eeprom_info eeprom
struct ixgbe_phy_info phy
u8 perm_addr[IXGBE_ETH_LENGTH_OF_ADDRESS]
u8 san_addr[IXGBE_ETH_LENGTH_OF_ADDRESS]
struct ixgbe_mac_operations ops
s32(* get_wwn_prefix)(struct ixgbe_hw *, u16 *, u16 *)
s32(* set_vlvf)(struct ixgbe_hw *, u32, u32, bool, u32 *, u32, bool)
s32(* reset_hw)(struct ixgbe_hw *)
void(* set_mac_anti_spoofing)(struct ixgbe_hw *, bool, int)
s32(* acquire_swfw_sync)(struct ixgbe_hw *, u32)
s32(* set_fw_drv_ver)(struct ixgbe_hw *, u8, u8, u8, u8, u16, const char *)
s32(* get_mac_addr)(struct ixgbe_hw *, u8 *)
s32(* init_rx_addrs)(struct ixgbe_hw *)
s32(* setup_link)(struct ixgbe_hw *, ixgbe_link_speed, bool)
s32(* set_rar)(struct ixgbe_hw *, u32, u8 *, u32, u32)
void(* release_swfw_sync)(struct ixgbe_hw *, u32)
s32(* read_analog_reg8)(struct ixgbe_hw *, u32, u8 *)
s32(* clear_vmdq)(struct ixgbe_hw *, u32, u32)
s32(* clear_vfta)(struct ixgbe_hw *)
void(* set_vlan_anti_spoofing)(struct ixgbe_hw *, bool, int)
void(* setup_rxpba)(struct ixgbe_hw *, int, u32, int)
s32(* set_vmdq)(struct ixgbe_hw *, u32, u32)
s32(* check_link)(struct ixgbe_hw *, ixgbe_link_speed *, bool *, bool)
void(* get_rtrup2tc)(struct ixgbe_hw *hw, u8 *map)
s32(* set_vfta)(struct ixgbe_hw *, u32, u32, bool, bool)
s32(* disable_sec_rx_path)(struct ixgbe_hw *)
s32(* enable_sec_rx_path)(struct ixgbe_hw *)
void(* init_swfw_sync)(struct ixgbe_hw *)
s32(* bypass_set)(struct ixgbe_hw *hw, u32 cmd, u32 event, u32 action)
s32(* get_san_mac_addr)(struct ixgbe_hw *, u8 *)
s32(* write_analog_reg8)(struct ixgbe_hw *, u32, u8)
s32(* init_uta_tables)(struct ixgbe_hw *)
s32(* get_device_caps)(struct ixgbe_hw *, u16 *)
void(* enable_relaxed_ordering)(struct ixgbe_hw *)
s32(* get_link_capabilities)(struct ixgbe_hw *, ixgbe_link_speed *, bool *)
s32(* insert_mac_addr)(struct ixgbe_hw *, u8 *, u32)
s32(* blink_led_stop)(struct ixgbe_hw *, u32)
enum ixgbe_media_type(* get_media_type)(struct ixgbe_hw *)
s32(* set_san_mac_addr)(struct ixgbe_hw *, u8 *)
s32(* get_fcoe_boot_status)(struct ixgbe_hw *, u16 *)
s32(* blink_led_start)(struct ixgbe_hw *, u32)
s32(* start_hw)(struct ixgbe_hw *)
s32(* set_vmdq_san_mac)(struct ixgbe_hw *, u32)
bool(* bypass_valid_rd)(u32 in_reg, u32 out_reg)
s32(* stop_adapter)(struct ixgbe_hw *)
s32(* bypass_rd_eep)(struct ixgbe_hw *hw, u32 addr, u8 *value)
u64(* get_supported_physical_layer)(struct ixgbe_hw *)
s32(* bypass_rw)(struct ixgbe_hw *hw, u32 cmd, u32 *status)
struct ixgbe_mbx_operations ops
void(* init_params)(struct ixgbe_hw *hw)
struct ixgbe_phy_operations ops
s32(* setup_link_speed)(struct ixgbe_hw *, ixgbe_link_speed, bool)
s32(* init)(struct ixgbe_hw *)
s32(* reset)(struct ixgbe_hw *)
s32(* set_phy_power)(struct ixgbe_hw *, bool on)
s32(* read_reg)(struct ixgbe_hw *, u32, u32, u16 *)