FreeBSD kernel IXGBE device code
|
#include "ixgbe_common.h"
#include "ixgbe_phy.h"
#include "ixgbe_dcb.h"
#include "ixgbe_dcb_82599.h"
#include "ixgbe_api.h"
Go to the source code of this file.
Macros | |
#define | IXGBE_MAX_SECRX_POLL 4000 |
#define | IXGBE_BYPASS_BB_WAIT 1 |
Variables | |
static const u8 | ixgbe_emc_temp_data [4] |
static const u8 | ixgbe_emc_therm_limit [4] |
#define IXGBE_BYPASS_BB_WAIT 1 |
ixgbe_bypass_rw_generic - Bit bang data into by_pass FW
@hw: pointer to hardware structure @cmd: Command we send to the FW @status: The reply from the FW
Bit-bangs the cmd to the by_pass FW status points to what is returned.
Definition at line 5032 of file ixgbe_common.c.
#define IXGBE_MAX_SECRX_POLL 4000 |
ixgbe_acquire_eeprom - Acquire EEPROM using bit-bang @hw: pointer to hardware structure
Prepares EEPROM for access using bit-bang method. This function should be called before issuing a command to the EEPROM.
Definition at line 1818 of file ixgbe_common.c.
References ixgbe_mac_operations::acquire_swfw_sync, DEBUGFUNC, DEBUGOUT, IXGBE_EEC_BY_MAC, IXGBE_EEC_CS, IXGBE_EEC_GNT, IXGBE_EEC_REQ, IXGBE_EEC_SK, IXGBE_EEPROM_GRANT_ATTEMPTS, IXGBE_ERR_EEPROM, IXGBE_ERR_SWFW_SYNC, IXGBE_GSSR_EEP_SM, IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_mac_info::ops, ixgbe_mac_operations::release_swfw_sync, and usec_delay.
Referenced by ixgbe_read_eeprom_buffer_bit_bang(), and ixgbe_write_eeprom_buffer_bit_bang().
ixgbe_acquire_swfw_sync - Acquire SWFW semaphore @hw: pointer to hardware structure @mask: Mask to specify which semaphore to acquire
Acquires the SWFW semaphore through the GSSR register for the specified function (CSR, PHY0, PHY1, EEPROM, Flash)
Definition at line 3287 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_ERR_SWFW_SYNC, ixgbe_get_eeprom_semaphore(), IXGBE_GSSR, IXGBE_READ_REG, ixgbe_release_eeprom_semaphore(), ixgbe_release_swfw_sync(), IXGBE_SUCCESS, IXGBE_WRITE_REG, and msec_delay.
Referenced by ixgbe_init_ops_generic().
ixgbe_add_uc_addr - Adds a secondary unicast address. @hw: pointer to hardware structure @addr: new address @vmdq: VMDq "set" or "pool" index
Adds it to unused receive address register or goes into promiscuous mode.
Definition at line 2544 of file ixgbe_common.c.
References ixgbe_hw::addr_ctrl, DEBUGFUNC, DEBUGOUT, DEBUGOUT1, DEBUGOUT6, IXGBE_RAH_AV, ixgbe_hw::mac, ixgbe_mac_info::num_rar_entries, ixgbe_mac_info::ops, ixgbe_addr_filter_info::overflow_promisc, ixgbe_addr_filter_info::rar_used_count, and ixgbe_mac_operations::set_rar.
Referenced by ixgbe_update_uc_addr_list_generic().
ixgbe_blink_led_start_generic - Blink LED based on index. @hw: pointer to hardware structure @index: led number to blink
Definition at line 3463 of file ixgbe_common.c.
References ixgbe_mac_operations::check_link, DEBUGFUNC, IXGBE_AUTOC_AN_RESTART, IXGBE_AUTOC_FLU, IXGBE_ERR_PARAM, IXGBE_LED_BLINK, IXGBE_LEDCTL, IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, ixgbe_hw::mac, msec_delay, ixgbe_mac_info::ops, ixgbe_mac_operations::prot_autoc_read, and ixgbe_mac_operations::prot_autoc_write.
Referenced by ixgbe_init_ops_generic().
ixgbe_blink_led_stop_generic - Stop blinking LED based on index. @hw: pointer to hardware structure @index: led number to stop blinking
Definition at line 3513 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_AUTOC_AN_RESTART, IXGBE_ERR_PARAM, IXGBE_LED_LINK_ACTIVE, IXGBE_LED_MODE_SHIFT, IXGBE_LEDCTL, IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_mac_info::ops, ixgbe_mac_operations::prot_autoc_read, and ixgbe_mac_operations::prot_autoc_write.
Referenced by ixgbe_init_ops_generic().
ixgbe_bypass_rd_eep_generic - Read the bypass FW eeprom addres.
@hw: pointer to hardware structure @addr: The bypass eeprom address to read. @value: The 8b of data at the address above.
Definition at line 5245 of file ixgbe_common.c.
References BYPASS_CTL2_DATA_M, BYPASS_CTL2_OFFSET_M, BYPASS_CTL2_OFFSET_SHIFT, BYPASS_PAGE_CTL2, BYPASS_WE, ixgbe_bypass_rw_generic(), IXGBE_ERR_INVALID_ARGUMENT, IXGBE_SUCCESS, and msec_delay.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
Definition at line 5033 of file ixgbe_common.c.
References IXGBE_BYPASS_BB_WAIT, IXGBE_ERR_DEVICE_NOT_SUPPORTED, IXGBE_ERR_PARAM, IXGBE_ESDP, IXGBE_ESDP_SDP0, IXGBE_ESDP_SDP0_DIR, IXGBE_ESDP_SDP1, IXGBE_ESDP_SDP1_DIR, IXGBE_ESDP_SDP2, IXGBE_ESDP_SDP2_DIR, IXGBE_ESDP_SDP6, IXGBE_ESDP_SDP6_DIR, IXGBE_ESDP_SDP7, IXGBE_ESDP_SDP7_DIR, ixgbe_mac_82599EB, ixgbe_mac_X540, IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, ixgbe_hw::mac, msec_delay, and ixgbe_mac_info::type.
Referenced by ixgbe_bypass_rd_eep_generic(), ixgbe_bypass_set_generic(), ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_bypass_set_generic - Set a bypass field in the FW CTRL Regiter.
@hw: pointer to hardware structure @cmd: The control word we are setting. @event: The event we are setting in the FW. This also happens to be the mask for the event we are setting (handy) @action: The action we set the event to in the FW. This is in a bit field that happens to be what we want to put in the event spot (also handy)
Definition at line 5203 of file ixgbe_common.c.
References BYPASS_PAGE_CTL0, BYPASS_PAGE_M, BYPASS_WE, IXGBE_BYPASS_FW_WRITE_FAILURE, ixgbe_bypass_rw_generic(), ixgbe_bypass_valid_rd_generic(), IXGBE_ERR_INVALID_ARGUMENT, IXGBE_SUCCESS, and msec_delay.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_bypass_valid_rd_generic - Verify valid return from bit-bang.
If we send a write we can't be sure it took until we can read back that same register. It can be a problem as some of the feilds may for valid reasons change inbetween the time wrote the register and we read it again to verify. So this function check everything we can check and then assumes it worked.
@u32 in_reg - The register cmd for the bit-bang read. @u32 out_reg - The register returned from a bit-bang read.
Definition at line 5147 of file ixgbe_common.c.
References BYPASS_AUX_OFF_M, BYPASS_AUX_ON_M, BYPASS_CTL1_TIME_M, BYPASS_CTL1_VALID_M, BYPASS_MAIN_OFF_M, BYPASS_MAIN_ON_M, BYPASS_PAGE_CTL0, BYPASS_PAGE_CTL1, BYPASS_PAGE_CTL2, BYPASS_PAGE_M, BYPASS_STATUS_OFF_M, BYPASS_WDT_VALUE_M, and BYPASS_WDTIMEOUT_M.
Referenced by ixgbe_bypass_set_generic(), ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_calc_eeprom_checksum_generic - Calculates and returns the checksum @hw: pointer to hardware structure
Returns a negative error code on error, or the 16-bit checksum
Definition at line 2212 of file ixgbe_common.c.
References DEBUGFUNC, DEBUGOUT, ixgbe_hw::eeprom, IXGBE_EEPROM_CHECKSUM, IXGBE_EEPROM_SUM, IXGBE_ERR_EEPROM, IXGBE_FW_PTR, IXGBE_PCIE_ANALOG_PTR, ixgbe_eeprom_info::ops, and ixgbe_eeprom_operations::read.
Referenced by ixgbe_init_ops_generic().
ixgbe_calculate_checksum - Calculate checksum for buffer @buffer: pointer to EEPROM @length: size of EEPROM to calculate a checksum for Calculates the checksum for some buffer on a specified length. The checksum calculated is returned.
Definition at line 4479 of file ixgbe_common.c.
References DEBUGFUNC.
Referenced by ixgbe_set_fw_drv_ver_generic(), and ixgbe_set_fw_drv_ver_x550().
s32 ixgbe_check_mac_link_generic | ( | struct ixgbe_hw * | hw, |
ixgbe_link_speed * | speed, | ||
bool * | link_up, | ||
bool | link_up_wait_to_complete | ||
) |
ixgbe_check_mac_link_generic - Determine link and speed status @hw: pointer to hardware structure @speed: pointer to link speed @link_up: true when link is up @link_up_wait_to_complete: bool used to wait for link up or not
Reads the links register to determine if link is up and the current speed
Definition at line 4176 of file ixgbe_common.c.
References DEBUGFUNC, DEBUGOUT2, ixgbe_hw::device_id, IXGBE_DEV_ID_X550EM_A_1G_T, IXGBE_DEV_ID_X550EM_A_1G_T_L, IXGBE_ESDP, IXGBE_ESDP_SDP0, IXGBE_ESDP_SDP2, IXGBE_LINK_SPEED_100_FULL, IXGBE_LINK_SPEED_10_FULL, IXGBE_LINK_SPEED_10GB_FULL, IXGBE_LINK_SPEED_1GB_FULL, IXGBE_LINK_SPEED_2_5GB_FULL, IXGBE_LINK_SPEED_5GB_FULL, IXGBE_LINK_SPEED_UNKNOWN, IXGBE_LINKS, IXGBE_LINKS_SPEED_100_82599, IXGBE_LINKS_SPEED_10_X550EM_A, IXGBE_LINKS_SPEED_10G_82599, IXGBE_LINKS_SPEED_1G_82599, IXGBE_LINKS_SPEED_82599, IXGBE_LINKS_SPEED_NON_STD, IXGBE_LINKS_UP, ixgbe_mac_82599EB, ixgbe_mac_X550, ixgbe_mac_X550EM_a, ixgbe_mac_X550EM_x, ixgbe_need_crosstalk_fix(), IXGBE_READ_REG, IXGBE_SUCCESS, ixgbe_hw::mac, ixgbe_mac_info::max_link_up_time, msec_delay, and ixgbe_mac_info::type.
Referenced by ixgbe_check_link_t_X550em(), ixgbe_init_mac_link_ops_X550em(), ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_clear_hw_cntrs_generic - Generic clear hardware counters @hw: pointer to hardware structure
Clears all hardware statistics counters by reading them from the hardware Statistics counters are clear on read.
Definition at line 528 of file ixgbe_common.c.
References DEBUGFUNC, ixgbe_phy_info::id, IXGBE_BPRC, IXGBE_BPTC, IXGBE_CRCERRS, IXGBE_ERRBC, IXGBE_GORCH, IXGBE_GORCL, IXGBE_GOTCH, IXGBE_GOTCL, IXGBE_GPRC, IXGBE_GPTC, ixgbe_identify_phy(), IXGBE_ILLERRC, IXGBE_LDPCECH, IXGBE_LDPCECL, IXGBE_LXOFFRXC, IXGBE_LXOFFRXCNT, IXGBE_LXOFFTXC, IXGBE_LXONRXC, IXGBE_LXONRXCNT, IXGBE_LXONTXC, ixgbe_mac_82598EB, ixgbe_mac_82599EB, ixgbe_mac_X540, ixgbe_mac_X550, IXGBE_MDIO_PCS_DEV_TYPE, IXGBE_MLFC, IXGBE_MNGPDC, IXGBE_MNGPRC, IXGBE_MNGPTC, IXGBE_MPC, IXGBE_MPRC, IXGBE_MPTC, IXGBE_MRFC, IXGBE_MSPDC, IXGBE_PCRC8ECH, IXGBE_PCRC8ECL, IXGBE_PRC1023, IXGBE_PRC127, IXGBE_PRC1522, IXGBE_PRC255, IXGBE_PRC511, IXGBE_PRC64, IXGBE_PTC1023, IXGBE_PTC127, IXGBE_PTC1522, IXGBE_PTC255, IXGBE_PTC511, IXGBE_PTC64, IXGBE_PXOFFRXC, IXGBE_PXOFFRXCNT, IXGBE_PXOFFTXC, IXGBE_PXON2OFFCNT, IXGBE_PXONRXC, IXGBE_PXONRXCNT, IXGBE_PXONTXC, IXGBE_QBRC, IXGBE_QBRC_H, IXGBE_QBRC_L, IXGBE_QBTC, IXGBE_QBTC_H, IXGBE_QBTC_L, IXGBE_QPRC, IXGBE_QPRDC, IXGBE_QPTC, IXGBE_READ_REG, IXGBE_RFC, IXGBE_RJC, IXGBE_RLEC, IXGBE_RNBC, IXGBE_ROC, IXGBE_RUC, IXGBE_SUCCESS, IXGBE_TORH, IXGBE_TORL, IXGBE_TPR, IXGBE_TPT, ixgbe_hw::mac, ixgbe_phy_info::ops, ixgbe_hw::phy, ixgbe_phy_operations::read_reg, and ixgbe_mac_info::type.
Referenced by ixgbe_init_ops_generic().
ixgbe_clear_rar_generic - Remove Rx address register @hw: pointer to hardware structure @index: Receive address register to write
Clears an ethernet address from a receive address register.
Definition at line 2436 of file ixgbe_common.c.
References ixgbe_mac_operations::clear_vmdq, DEBUGFUNC, ERROR_REPORT2, IXGBE_CLEAR_VMDQ_ALL, IXGBE_ERR_INVALID_ARGUMENT, IXGBE_ERROR_ARGUMENT, IXGBE_RAH, IXGBE_RAH_AV, IXGBE_RAL, IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_mac_info::num_rar_entries, and ixgbe_mac_info::ops.
Referenced by ixgbe_init_ops_generic().
void ixgbe_clear_tx_pending | ( | struct ixgbe_hw * | hw | ) |
ixgbe_clear_tx_pending - Clear pending TX work from the PCIe fifo @hw: pointer to the hardware structure
The 82599 and x540 MACs can experience issues if TX work is still pending when a reset occurs. This function prevents this by flushing the PCIe buffers on the system.
Definition at line 4802 of file ixgbe_common.c.
References ixgbe_mac_info::flags, ixgbe_hw::hw_addr, IXGBE_FLAGS_DOUBLE_RESET_REQUIRED, IXGBE_GCR_EXT, IXGBE_GCR_EXT_BUFFERS_CLEAR, IXGBE_HLREG0, IXGBE_HLREG0_LPBK, IXGBE_PCI_DEVICE_STATUS, IXGBE_PCI_DEVICE_STATUS_TRANSACTION_PENDING, ixgbe_pcie_timeout_poll(), IXGBE_READ_PCIE_WORD, IXGBE_READ_REG, IXGBE_REMOVED, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, ixgbe_hw::mac, msec_delay, and usec_delay.
Referenced by ixgbe_reset_hw_82599(), ixgbe_reset_hw_X540(), and ixgbe_reset_hw_X550em().
ixgbe_clear_vfta_generic - Clear VLAN filter table @hw: pointer to hardware structure
Clears the VLAN filer table, and the VMDq index associated with the filter
Definition at line 4123 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_SUCCESS, IXGBE_VFTA, IXGBE_VLVF, IXGBE_VLVF_ENTRIES, IXGBE_VLVFB, IXGBE_WRITE_REG, ixgbe_hw::mac, and ixgbe_mac_info::vft_size.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_clear_vmdq_generic - Disassociate a VMDq pool index from a rx address @hw: pointer to hardware struct @rar: receive address register index to disassociate @vmdq: VMDq pool index to remove from the rar
Definition at line 3789 of file ixgbe_common.c.
References ixgbe_mac_operations::clear_rar, DEBUGFUNC, ERROR_REPORT2, ixgbe_hw::hw_addr, IXGBE_CLEAR_VMDQ_ALL, IXGBE_ERR_INVALID_ARGUMENT, IXGBE_ERROR_ARGUMENT, IXGBE_MPSAR_HI, IXGBE_MPSAR_LO, IXGBE_READ_REG, IXGBE_REMOVED, IXGBE_SUCCESS, IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_mac_info::num_rar_entries, ixgbe_mac_info::ops, and ixgbe_mac_info::san_mac_rar_index.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_dcb_get_rtrup2tc_generic - read rtrup2tc reg @hw: pointer to hardware structure @map: pointer to u8 arr for returning map
Read the rtrup2tc HW register and resolve its content into map
Definition at line 5389 of file ixgbe_common.c.
References IXGBE_DCB_MAX_USER_PRIORITY, IXGBE_READ_REG, IXGBE_RTRUP2TC, IXGBE_RTRUP2TC_UP_MASK, and IXGBE_RTRUP2TC_UP_SHIFT.
Referenced by ixgbe_init_ops_82599(), ixgbe_init_ops_X540(), and ixgbe_init_ops_X550().
ixgbe_detect_eeprom_page_size_generic - Detect EEPROM page size @hw: pointer to hardware structure @offset: offset within the EEPROM to be used as a scratch pad
Discover EEPROM page size by writing marching data at given offset. This function is called only when we are writing a new large buffer at given offset so the data would be overwritten anyway.
Definition at line 1658 of file ixgbe_common.c.
References DEBUGFUNC, DEBUGOUT1, ixgbe_hw::eeprom, IXGBE_EEPROM_PAGE_SIZE_MAX, ixgbe_read_eeprom_buffer_bit_bang(), IXGBE_SUCCESS, ixgbe_write_eeprom_buffer_bit_bang(), and ixgbe_eeprom_info::word_page_size.
Referenced by ixgbe_write_eeprom_buffer_bit_bang_generic().
ixgbe_device_supports_autoneg_fc - Check if device supports autonegotiation of flow control @hw: pointer to hardware structure
This function returns true if the device supports flow control autonegotiation, and false if it does not.
Definition at line 163 of file ixgbe_common.c.
References ixgbe_mac_operations::check_link, DEBUGFUNC, ixgbe_hw::device_id, ERROR_REPORT2, IXGBE_DEV_ID_82599_T3_LOM, IXGBE_DEV_ID_X540_BYPASS, IXGBE_DEV_ID_X540T, IXGBE_DEV_ID_X540T1, IXGBE_DEV_ID_X550EM_A_10G_T, IXGBE_DEV_ID_X550EM_A_1G_T, IXGBE_DEV_ID_X550EM_A_1G_T_L, IXGBE_DEV_ID_X550EM_A_QSFP, IXGBE_DEV_ID_X550EM_A_QSFP_N, IXGBE_DEV_ID_X550EM_A_SFP, IXGBE_DEV_ID_X550EM_A_SFP_N, IXGBE_DEV_ID_X550EM_X_10G_T, IXGBE_DEV_ID_X550EM_X_XFI, IXGBE_DEV_ID_X550T, IXGBE_DEV_ID_X550T1, IXGBE_ERROR_UNSUPPORTED, IXGBE_LINK_SPEED_1GB_FULL, ixgbe_media_type_backplane, ixgbe_media_type_copper, ixgbe_media_type_fiber, ixgbe_media_type_fiber_fixed, ixgbe_media_type_fiber_qsfp, ixgbe_hw::mac, ixgbe_phy_info::media_type, ixgbe_mac_info::ops, and ixgbe_hw::phy.
Referenced by ixgbe_fc_autoneg(), and ixgbe_setup_fc_generic().
ixgbe_disable_mc_generic - Disable multicast address in RAR @hw: pointer to hardware structure
Disables multicast address in RAR and the use of the multicast hash table.
Definition at line 2793 of file ixgbe_common.c.
References ixgbe_hw::addr_ctrl, DEBUGFUNC, IXGBE_MCSTCTRL, IXGBE_SUCCESS, IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_mac_info::mc_filter_type, and ixgbe_addr_filter_info::mta_in_use.
Referenced by ixgbe_init_ops_generic().
ixgbe_disable_pcie_master - Disable PCI-express master access @hw: pointer to hardware structure
Disables PCI-Express master access and verifies there are no pending requests. IXGBE_ERR_MASTER_REQUESTS_PENDING is returned if master disable bit hasn't caused the master requests to be disabled, else IXGBE_SUCCESS is returned signifying master requests disabled.
Definition at line 3220 of file ixgbe_common.c.
References DEBUGFUNC, DEBUGOUT, ERROR_REPORT1, ixgbe_mac_info::flags, ixgbe_hw::hw_addr, IXGBE_CTRL, IXGBE_CTRL_GIO_DIS, IXGBE_ERR_MASTER_REQUESTS_PENDING, IXGBE_ERROR_POLLING, IXGBE_FLAGS_DOUBLE_RESET_REQUIRED, ixgbe_mac_X550, IXGBE_PCI_DEVICE_STATUS, IXGBE_PCI_DEVICE_STATUS_TRANSACTION_PENDING, IXGBE_PCI_MASTER_DISABLE_TIMEOUT, ixgbe_pcie_timeout_poll(), IXGBE_READ_PCIE_WORD, IXGBE_READ_REG, IXGBE_REMOVED, IXGBE_STATUS, IXGBE_STATUS_GIO, IXGBE_SUCCESS, IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_mac_info::type, and usec_delay.
Referenced by ixgbe_stop_adapter_generic().
void ixgbe_disable_rx_generic | ( | struct ixgbe_hw * | hw | ) |
Definition at line 5400 of file ixgbe_common.c.
References ixgbe_mac_82598EB, IXGBE_PFDTXGSWC, IXGBE_PFDTXGSWC_VT_LBEN, IXGBE_READ_REG, IXGBE_RXCTRL, IXGBE_RXCTRL_RXEN, IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_mac_info::set_lben, and ixgbe_mac_info::type.
Referenced by ixgbe_init_ops_generic().
ixgbe_disable_sec_rx_path_generic - Stops the receive data path @hw: pointer to hardware structure
Stops the receive data path and waits for the HW to internally empty the Rx security block
Definition at line 3357 of file ixgbe_common.c.
References DEBUGFUNC, DEBUGOUT, IXGBE_MAX_SECRX_POLL, IXGBE_READ_REG, IXGBE_SECRXCTRL, IXGBE_SECRXCTRL_RX_DIS, IXGBE_SECRXSTAT, IXGBE_SECRXSTAT_SECRX_RDY, IXGBE_SUCCESS, IXGBE_WRITE_REG, and usec_delay.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_enable_mc_generic - Enable multicast address in RAR @hw: pointer to hardware structure
Enables multicast address in RAR and the use of the multicast hash table.
Definition at line 2774 of file ixgbe_common.c.
References ixgbe_hw::addr_ctrl, DEBUGFUNC, IXGBE_MCSTCTRL, IXGBE_MCSTCTRL_MFE, IXGBE_SUCCESS, IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_mac_info::mc_filter_type, and ixgbe_addr_filter_info::mta_in_use.
Referenced by ixgbe_init_ops_generic().
void ixgbe_enable_relaxed_ordering_gen2 | ( | struct ixgbe_hw * | hw | ) |
ixgbe_enable_relaxed_ordering_gen2 - Enable relaxed ordering @hw: pointer to hardware structure
Definition at line 4449 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_DCA_RXCTRL, IXGBE_DCA_RXCTRL_DATA_WRO_EN, IXGBE_DCA_RXCTRL_HEAD_WRO_EN, IXGBE_DCA_TXCTRL_82599, IXGBE_DCA_TXCTRL_DESC_WRO_EN, IXGBE_READ_REG, IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_mac_info::max_rx_queues, and ixgbe_mac_info::max_tx_queues.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_enable_rx_dma_generic - Enable the Rx DMA unit @hw: pointer to hardware structure @regval: register value to write to RXCTRL
Enables the Rx DMA unit
Definition at line 3446 of file ixgbe_common.c.
References DEBUGFUNC, ixgbe_disable_rx(), ixgbe_enable_rx(), IXGBE_RXCTRL_RXEN, and IXGBE_SUCCESS.
Referenced by ixgbe_init_ops_generic().
void ixgbe_enable_rx_generic | ( | struct ixgbe_hw * | hw | ) |
Definition at line 5422 of file ixgbe_common.c.
References ixgbe_mac_82598EB, IXGBE_PFDTXGSWC, IXGBE_PFDTXGSWC_VT_LBEN, IXGBE_READ_REG, IXGBE_RXCTRL, IXGBE_RXCTRL_RXEN, IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_mac_info::set_lben, and ixgbe_mac_info::type.
Referenced by ixgbe_init_ops_generic().
ixgbe_enable_sec_rx_path_generic - Enables the receive data path @hw: pointer to hardware structure
Enables the receive data path.
Definition at line 3425 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_READ_REG, IXGBE_SECRXCTRL, IXGBE_SUCCESS, IXGBE_WRITE_FLUSH, and IXGBE_WRITE_REG.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
void ixgbe_fc_autoneg | ( | struct ixgbe_hw * | hw | ) |
ixgbe_fc_autoneg - Configure flow control @hw: pointer to hardware structure
Compares our advertised flow control capabilities to those advertised by our link partner, and determines the proper flow control mode to use.
Definition at line 3104 of file ixgbe_common.c.
References ixgbe_mac_operations::check_link, ixgbe_fc_info::current_mode, DEBUGFUNC, ixgbe_fc_info::disable_fc_autoneg, ERROR_REPORT1, ixgbe_hw::fc, ixgbe_fc_info::fc_was_autonegged, ixgbe_device_supports_autoneg_fc(), IXGBE_ERR_FC_NOT_NEGOTIATED, IXGBE_ERROR_CAUTION, IXGBE_ERROR_SOFTWARE, ixgbe_fc_autoneg_backplane(), ixgbe_fc_autoneg_copper(), ixgbe_fc_autoneg_fiber(), IXGBE_LINK_SPEED_1GB_FULL, ixgbe_media_type_backplane, ixgbe_media_type_copper, ixgbe_media_type_fiber, ixgbe_media_type_fiber_fixed, ixgbe_media_type_fiber_qsfp, IXGBE_SUCCESS, ixgbe_hw::mac, ixgbe_phy_info::media_type, ixgbe_mac_info::ops, ixgbe_hw::phy, and ixgbe_fc_info::requested_mode.
Referenced by ixgbe_fc_enable_82598(), and ixgbe_init_ops_generic().
ixgbe_fc_autoneg_backplane - Enable flow control IEEE clause 37 @hw: pointer to hardware structure
Enable flow control according to IEEE clause 37.
Definition at line 3035 of file ixgbe_common.c.
References DEBUGOUT, IXGBE_ANLP1, IXGBE_ANLP1_ASM_PAUSE, IXGBE_ANLP1_SYM_PAUSE, IXGBE_AUTOC, IXGBE_AUTOC_ASM_PAUSE, IXGBE_AUTOC_SYM_PAUSE, IXGBE_ERR_FC_NOT_NEGOTIATED, IXGBE_LINKS, IXGBE_LINKS2, IXGBE_LINKS2_AN_SUPPORTED, IXGBE_LINKS_KX_AN_COMP, ixgbe_mac_82599EB, ixgbe_negotiate_fc(), IXGBE_READ_REG, ixgbe_hw::mac, and ixgbe_mac_info::type.
Referenced by ixgbe_fc_autoneg().
ixgbe_fc_autoneg_copper - Enable flow control IEEE clause 37 @hw: pointer to hardware structure
Enable flow control according to IEEE clause 37.
Definition at line 3079 of file ixgbe_common.c.
References IXGBE_MDIO_AUTO_NEG_ADVT, IXGBE_MDIO_AUTO_NEG_DEV_TYPE, IXGBE_MDIO_AUTO_NEG_LP, ixgbe_negotiate_fc(), IXGBE_TAF_ASM_PAUSE, IXGBE_TAF_SYM_PAUSE, ixgbe_phy_info::ops, ixgbe_hw::phy, and ixgbe_phy_operations::read_reg.
Referenced by ixgbe_fc_autoneg().
ixgbe_fc_autoneg_fiber - Enable flow control on 1 gig fiber @hw: pointer to hardware structure
Enable flow control according on 1 gig fiber.
Definition at line 2998 of file ixgbe_common.c.
References DEBUGOUT, IXGBE_ERR_FC_NOT_NEGOTIATED, ixgbe_negotiate_fc(), IXGBE_PCS1GANA, IXGBE_PCS1GANA_ASM_PAUSE, IXGBE_PCS1GANA_SYM_PAUSE, IXGBE_PCS1GANLP, IXGBE_PCS1GLSTA, IXGBE_PCS1GLSTA_AN_COMPLETE, IXGBE_PCS1GLSTA_AN_TIMED_OUT, and IXGBE_READ_REG.
Referenced by ixgbe_fc_autoneg().
ixgbe_fc_enable_generic - Enable flow control @hw: pointer to hardware structure
Enable flow control according to the current settings.
Definition at line 2811 of file ixgbe_common.c.
References ixgbe_fc_info::current_mode, DEBUGFUNC, DEBUGOUT, ERROR_REPORT1, ixgbe_hw::fc, ixgbe_mac_operations::fc_autoneg, ixgbe_fc_info::high_water, IXGBE_DCB_MAX_TRAFFIC_CLASS, IXGBE_ERR_CONFIG, IXGBE_ERR_INVALID_LINK_SETTINGS, IXGBE_ERROR_ARGUMENT, ixgbe_fc_full, ixgbe_fc_none, ixgbe_fc_rx_pause, ixgbe_fc_tx_pause, IXGBE_FCCFG, IXGBE_FCCFG_TFCE_802_3X, IXGBE_FCCFG_TFCE_PRIORITY, IXGBE_FCRTH_82599, IXGBE_FCRTH_FCEN, IXGBE_FCRTL_82599, IXGBE_FCRTL_XONE, IXGBE_FCRTV, IXGBE_FCTTV, IXGBE_MFLCN, IXGBE_MFLCN_DPF, IXGBE_MFLCN_RFCE, IXGBE_MFLCN_RPFCE_MASK, IXGBE_READ_REG, IXGBE_RXPBSIZE, IXGBE_SUCCESS, IXGBE_WRITE_REG, ixgbe_fc_info::low_water, ixgbe_hw::mac, ixgbe_mac_info::ops, and ixgbe_fc_info::pause_time.
Referenced by ixgbe_init_ops_generic().
ixgbe_find_vlvf_slot - find the vlanid or the first empty slot @hw: pointer to hardware structure @vlan: VLAN id to write to VLAN filter @vlvf_bypass: true to find vlanid only, false returns first empty slot if vlanid not found
return the VLVF index where this VLAN id should be placed
Definition at line 3924 of file ixgbe_common.c.
References ERROR_REPORT1, IXGBE_ERR_NO_SPACE, IXGBE_ERROR_SOFTWARE, IXGBE_READ_REG, IXGBE_VLVF, IXGBE_VLVF_ENTRIES, and IXGBE_VLVF_VIEN.
Referenced by ixgbe_set_vlvf_generic().
ixgbe_get_bus_info_generic - Generic set PCI bus info @hw: pointer to hardware structure
Gets the PCI bus info (speed, width, type) then calls helper function to store this data within the ixgbe_hw structure.
Definition at line 1055 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_PCI_LINK_STATUS, IXGBE_READ_PCIE_WORD, ixgbe_set_pci_config_data_generic(), and IXGBE_SUCCESS.
Referenced by ixgbe_init_ops_generic().
ixgbe_get_device_caps_generic - Get additional device capabilities @hw: pointer to hardware structure @device_caps: the EEPROM word with the extra device capabilities
This function will read the EEPROM location for the device capabilities, and return the word through device_caps.
Definition at line 4435 of file ixgbe_common.c.
References DEBUGFUNC, ixgbe_hw::eeprom, IXGBE_DEVICE_CAPS, IXGBE_SUCCESS, ixgbe_eeprom_info::ops, and ixgbe_eeprom_operations::read.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_get_eeprom_semaphore - Get hardware semaphore @hw: pointer to hardware structure
Sets the hardware semaphores so EEPROM access can occur for bit-bang method
Definition at line 1872 of file ixgbe_common.c.
References DEBUGFUNC, DEBUGOUT, ERROR_REPORT1, IXGBE_ERR_EEPROM, IXGBE_ERROR_POLLING, IXGBE_READ_REG, ixgbe_release_eeprom_semaphore(), IXGBE_SUCCESS, IXGBE_SWSM_BY_MAC, IXGBE_SWSM_SMBI, IXGBE_SWSM_SWESMBI, IXGBE_WRITE_REG, and usec_delay.
Referenced by ixgbe_acquire_swfw_sync(), and ixgbe_release_swfw_sync().
void ixgbe_get_etk_id | ( | struct ixgbe_hw * | hw, |
struct ixgbe_nvm_version * | nvm_ver | ||
) |
ixgbe_get_etk_id - Return Etrack ID from EEPROM
@hw: pointer to hardware structure @nvm_ver: pointer to output structure
word read errors will return 0xFFFF
Definition at line 5360 of file ixgbe_common.c.
References ixgbe_hw::eeprom, ixgbe_nvm_version::etk_id, NVM_ETK_OFF_HI, NVM_ETK_OFF_LOW, NVM_ETK_SHIFT, NVM_ETK_VALID, NVM_VER_INVALID, ixgbe_eeprom_info::ops, and ixgbe_eeprom_operations::read.
Referenced by ixgbe_sbuf_fw_version().
ixgbe_get_fcoe_boot_status_generic - Get FCOE boot status from EEPROM @hw: pointer to hardware structure @bs: the fcoe boot status
This function will read the FCOE boot status from the iSCSI FCOE block
Definition at line 4337 of file ixgbe_common.c.
References DEBUGFUNC, ixgbe_hw::eeprom, ixgbe_fcoe_bootstatus_disabled, ixgbe_fcoe_bootstatus_enabled, ixgbe_fcoe_bootstatus_unavailable, IXGBE_FCOE_IBA_CAPS_BLK_PTR, IXGBE_FCOE_IBA_CAPS_FCOE, IXGBE_ISCSI_FCOE_BLK_PTR, IXGBE_ISCSI_FCOE_FLAGS_ENABLE, IXGBE_ISCSI_FCOE_FLAGS_OFFSET, IXGBE_SUCCESS, ixgbe_eeprom_info::ops, and ixgbe_eeprom_operations::read.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_get_mac_addr_generic - Generic get MAC address @hw: pointer to hardware structure @mac_addr: Adapter MAC address
Reads the adapter's MAC address from first Receive Address Register (RAR0) A reset of the adapter must be performed prior to calling this function in order for the MAC address to have been loaded from the EEPROM into RAR0
Definition at line 978 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_RAH, IXGBE_RAL, IXGBE_READ_REG, and IXGBE_SUCCESS.
Referenced by ixgbe_init_ops_generic().
void ixgbe_get_oem_prod_version | ( | struct ixgbe_hw * | hw, |
struct ixgbe_nvm_version * | nvm_ver | ||
) |
ixgbe_get_oem_prod_version - Return OEM Product version
@hw: pointer to hardware structure @nvm_ver: pointer to output structure
if valid OEM product version, nvm_ver->oem_valid set to true else nvm_ver->oem_valid is false.
Definition at line 5317 of file ixgbe_common.c.
References ixgbe_hw::eeprom, NVM_INVALID_PTR, NVM_OEM_PROD_VER_CAP_MASK, NVM_OEM_PROD_VER_CAP_OFF, NVM_OEM_PROD_VER_MOD_LEN, NVM_OEM_PROD_VER_OFF_H, NVM_OEM_PROD_VER_OFF_L, NVM_OEM_PROD_VER_PTR, NVM_VER_INVALID, NVM_VER_MASK, NVM_VER_SHIFT, ixgbe_nvm_version::oem_major, ixgbe_nvm_version::oem_minor, ixgbe_nvm_version::oem_release, ixgbe_nvm_version::oem_valid, ixgbe_eeprom_info::ops, and ixgbe_eeprom_operations::read.
Referenced by ixgbe_sbuf_fw_version().
void ixgbe_get_orom_version | ( | struct ixgbe_hw * | hw, |
struct ixgbe_nvm_version * | nvm_ver | ||
) |
ixgbe_get_orom_version - Return option ROM from EEPROM
@hw: pointer to hardware structure @nvm_ver: pointer to output structure
if valid option ROM version, nvm_ver->or_valid set to true else nvm_ver->or_valid is false.
Definition at line 5279 of file ixgbe_common.c.
References ixgbe_hw::eeprom, NVM_INVALID_PTR, NVM_OROM_BLK_HI, NVM_OROM_BLK_LOW, NVM_OROM_OFFSET, NVM_OROM_PATCH_MASK, NVM_OROM_SHIFT, NVM_VER_INVALID, ixgbe_eeprom_info::ops, ixgbe_nvm_version::or_build, ixgbe_nvm_version::or_major, ixgbe_nvm_version::or_patch, ixgbe_nvm_version::or_valid, and ixgbe_eeprom_operations::read.
Referenced by ixgbe_sbuf_fw_version().
s32 ixgbe_get_pba_block_size | ( | struct ixgbe_hw * | hw, |
u16 * | eeprom_buf, | ||
u32 | eeprom_buf_size, | ||
u16 * | pba_block_size | ||
) |
ixgbe_get_pba_block_size @hw: pointer to the HW structure @eeprom_buf: optional pointer to EEPROM image @eeprom_buf_size: size of EEPROM image in words @pba_data_size: pointer to output variable
Returns the size of the PBA block in words. Function operates on EEPROM image if the eeprom_buf pointer is not NULL otherwise it accesses physical EEPROM device.
Definition at line 920 of file ixgbe_common.c.
References DEBUGFUNC, ixgbe_hw::eeprom, IXGBE_ERR_PARAM, IXGBE_ERR_PBA_SECTION, IXGBE_PBANUM0_PTR, IXGBE_PBANUM1_PTR, IXGBE_PBANUM_PTR_GUARD, IXGBE_SUCCESS, ixgbe_eeprom_info::ops, ixgbe_eeprom_operations::read, and ixgbe_eeprom_operations::read_buffer.
Referenced by ixgbe_read_pba_raw().
ixgbe_get_pcie_msix_count_generic - Gets MSI-X vector count @hw: pointer to hardware structure
Read PCIe configuration space, and get the MSI-X vector count from the capabilities table.
Definition at line 3676 of file ixgbe_common.c.
References DEBUGFUNC, ixgbe_hw::hw_addr, ixgbe_mac_82598EB, ixgbe_mac_82599EB, ixgbe_mac_X540, ixgbe_mac_X550, ixgbe_mac_X550EM_a, ixgbe_mac_X550EM_x, IXGBE_MAX_MSIX_VECTORS_82598, IXGBE_MAX_MSIX_VECTORS_82599, IXGBE_PCIE_MSIX_82598_CAPS, IXGBE_PCIE_MSIX_82599_CAPS, IXGBE_PCIE_MSIX_TBL_SZ_MASK, IXGBE_READ_PCIE_WORD, IXGBE_REMOVED, ixgbe_hw::mac, and ixgbe_mac_info::type.
Referenced by ixgbe_init_ops_82598(), ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_get_san_mac_addr_generic - SAN MAC address retrieval from the EEPROM @hw: pointer to hardware structure @san_mac_addr: SAN MAC address
Reads the SAN MAC address from the EEPROM, if it's available. This is per-port, so set_lan_id() must be called before reading the addresses. set_lan_id() is called by identify_sfp(), but this cannot be relied upon for non-SFP connections, so we must call it here.
Definition at line 3587 of file ixgbe_common.c.
References ixgbe_hw::bus, DEBUGFUNC, ixgbe_hw::eeprom, ERROR_REPORT2, ixgbe_bus_info::func, IXGBE_ERROR_INVALID_STATE, ixgbe_get_san_mac_addr_offset(), IXGBE_SAN_MAC_ADDR_PORT0_OFFSET, IXGBE_SAN_MAC_ADDR_PORT1_OFFSET, IXGBE_SUCCESS, ixgbe_hw::mac, ixgbe_eeprom_info::ops, ixgbe_mac_info::ops, ixgbe_eeprom_operations::read, and ixgbe_mac_operations::set_lan_id.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_get_san_mac_addr_offset - Get SAN MAC address offset from the EEPROM @hw: pointer to hardware structure @san_mac_offset: SAN MAC address offset
This function will read the EEPROM location for the SAN MAC address pointer, and returns the value at that location. This is used in both get and set mac_addr routines.
Definition at line 3555 of file ixgbe_common.c.
References DEBUGFUNC, ixgbe_hw::eeprom, ERROR_REPORT2, IXGBE_ERROR_INVALID_STATE, IXGBE_SAN_MAC_ADDR_PTR, ixgbe_eeprom_info::ops, and ixgbe_eeprom_operations::read.
Referenced by ixgbe_get_san_mac_addr_generic(), and ixgbe_set_san_mac_addr_generic().
ixgbe_get_thermal_sensor_data - Gathers thermal sensor data @hw: pointer to hardware structure
Returns the thermal sensor data structure
Definition at line 4874 of file ixgbe_common.c.
References DEBUGFUNC, ixgbe_hw::eeprom, ixgbe_emc_temp_data, IXGBE_ETS_CFG, IXGBE_ETS_DATA_INDEX_MASK, IXGBE_ETS_DATA_INDEX_SHIFT, IXGBE_ETS_DATA_LOC_MASK, IXGBE_ETS_DATA_LOC_SHIFT, IXGBE_ETS_NUM_SENSORS_MASK, IXGBE_ETS_TYPE_EMC, IXGBE_ETS_TYPE_MASK, IXGBE_ETS_TYPE_SHIFT, IXGBE_I2C_THERMAL_SENSOR_ADDR, ixgbe_mac_82599EB, IXGBE_MAX_SENSORS, IXGBE_NOT_IMPLEMENTED, IXGBE_READ_REG, IXGBE_STATUS, IXGBE_STATUS_LAN_ID_1, IXGBE_SUCCESS, ixgbe_hw::mac, ixgbe_eeprom_info::ops, ixgbe_phy_info::ops, ixgbe_hw::phy, ixgbe_eeprom_operations::read, ixgbe_phy_operations::read_i2c_byte, ixgbe_thermal_sensor_data::sensor, ixgbe_thermal_diode_data::temp, ixgbe_mac_info::thermal_sensor_data, and ixgbe_mac_info::type.
Referenced by ixgbe_init_ops_82599().
ixgbe_get_wwn_prefix_generic - Get alternative WWNN/WWPN prefix from the EEPROM @hw: pointer to hardware structure @wwnn_prefix: the alternative WWNN prefix @wwpn_prefix: the alternative WWPN prefix
This function will read the EEPROM from the alternative SAN MAC address block to check the support for the alternative WWNN/WWPN prefix support.
Definition at line 4282 of file ixgbe_common.c.
References DEBUGFUNC, ixgbe_hw::eeprom, ERROR_REPORT2, IXGBE_ALT_SAN_MAC_ADDR_BLK_PTR, IXGBE_ALT_SAN_MAC_ADDR_CAPS_ALTWWN, IXGBE_ALT_SAN_MAC_ADDR_CAPS_OFFSET, IXGBE_ALT_SAN_MAC_ADDR_WWNN_OFFSET, IXGBE_ALT_SAN_MAC_ADDR_WWPN_OFFSET, IXGBE_ERROR_INVALID_STATE, IXGBE_SUCCESS, ixgbe_eeprom_info::ops, and ixgbe_eeprom_operations::read.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_hic_unlocked - Issue command to manageability block unlocked @hw: pointer to the HW structure @buffer: command to write and where the return status will be placed @length: length of buffer, must be multiple of 4 bytes @timeout: time in ms to wait for command completion
Communicates with the manageability block. On success return IXGBE_SUCCESS else returns semaphore error when encountering an error acquiring semaphore or IXGBE_ERR_HOST_INTERFACE_COMMAND when command fails.
This function assumes that the IXGBE_GSSR_SW_MNG_SM semaphore is held by the caller.
Definition at line 4509 of file ixgbe_common.c.
References DEBUGFUNC, DEBUGOUT, DEBUGOUT1, ERROR_REPORT1, IXGBE_CPU_TO_LE32, IXGBE_ERR_HOST_INTERFACE_COMMAND, IXGBE_ERR_INVALID_ARGUMENT, IXGBE_ERROR_CAUTION, IXGBE_FLEX_MNG, IXGBE_FWSTS, IXGBE_FWSTS_FWRI, IXGBE_HI_MAX_BLOCK_BYTE_LENGTH, IXGBE_HICR, IXGBE_HICR_C, IXGBE_HICR_EN, IXGBE_HICR_SV, IXGBE_HOST_INTERFACE_APPLY_UPDATE_CMD, IXGBE_HOST_INTERFACE_MASK_CMD, IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_WRITE_REG, IXGBE_WRITE_REG_ARRAY, and msec_delay.
Referenced by ixgbe_host_interface_command(), ixgbe_read_ee_hostif_buffer_X550(), and ixgbe_read_ee_hostif_X550().
s32 ixgbe_host_interface_command | ( | struct ixgbe_hw * | hw, |
u32 * | buffer, | ||
u32 | length, | ||
u32 | timeout, | ||
bool | return_data | ||
) |
ixgbe_host_interface_command - Issue command to manageability block @hw: pointer to the HW structure @buffer: contains the command to write and where the return status will be placed @length: length of buffer, must be multiple of 4 bytes @timeout: time in ms to wait for command completion @return_data: read and return data from the buffer (true) or not (false) Needed because FW structures are big endian and decoding of these fields can be 8 bit or 16 bit based on command. Decoding is not easily understood without making a table of commands. So we will leave this up to the caller to read back the data in these cases.
Communicates with the manageability block. On success return IXGBE_SUCCESS else returns semaphore error when encountering an error acquiring semaphore or IXGBE_ERR_HOST_INTERFACE_COMMAND when command fails.
Definition at line 4594 of file ixgbe_common.c.
References ixgbe_mac_operations::acquire_swfw_sync, ixgbe_hic_hdr::buf_len, ixgbe_hic_hdr::cmd, ixgbe_hic_hdr::cmd_or_resp, DEBUGFUNC, DEBUGOUT, DEBUGOUT1, IXGBE_ERR_HOST_INTERFACE_COMMAND, IXGBE_FLEX_MNG, IXGBE_GSSR_SW_MNG_SM, IXGBE_HI_MAX_BLOCK_BYTE_LENGTH, ixgbe_hic_unlocked(), IXGBE_HOST_INTERFACE_FLASH_READ_CMD, IXGBE_HOST_INTERFACE_SHADOW_RAM_READ_CMD, IXGBE_LE32_TO_CPUS, IXGBE_READ_REG_ARRAY, ixgbe_hw::mac, ixgbe_mac_info::ops, ixgbe_mac_operations::release_swfw_sync, and ixgbe_hic_hdr::ret_status.
Referenced by ixgbe_disable_rx_x550(), ixgbe_fw_phy_activity(), ixgbe_get_phy_token(), ixgbe_put_phy_token(), ixgbe_read_iosf_sb_reg_x550a(), ixgbe_set_fw_drv_ver_generic(), ixgbe_set_fw_drv_ver_x550(), ixgbe_update_flash_X550(), ixgbe_write_ee_hostif_data_X550(), and ixgbe_write_iosf_sb_reg_x550a().
ixgbe_init_eeprom_params_generic - Initialize EEPROM params @hw: pointer to hardware structure
Initializes the EEPROM parameters ixgbe_eeprom_info within the ixgbe_hw struct in order to set up EEPROM access.
Definition at line 1250 of file ixgbe_common.c.
References ixgbe_eeprom_info::address_bits, DEBUGFUNC, DEBUGOUT3, ixgbe_hw::eeprom, IXGBE_EEC_ADDR_SIZE, IXGBE_EEC_BY_MAC, IXGBE_EEC_PRES, IXGBE_EEC_SIZE, IXGBE_EEC_SIZE_SHIFT, ixgbe_eeprom_none, ixgbe_eeprom_spi, ixgbe_eeprom_uninitialized, IXGBE_EEPROM_WORD_SIZE_SHIFT, IXGBE_READ_REG, IXGBE_SUCCESS, ixgbe_eeprom_info::semaphore_delay, ixgbe_eeprom_info::type, ixgbe_eeprom_info::word_page_size, and ixgbe_eeprom_info::word_size.
Referenced by ixgbe_init_ops_generic().
ixgbe_init_hw_generic - Generic hardware initialization @hw: pointer to hardware structure
Initialize the hardware by resetting the hardware, filling the bus info structure and media type, clears all on chip counters, initializes receive address registers, multicast table, VLAN filter table, calls routine to set up link and flow control settings, and leaves transmit and receive units disabled and uninitialized
Definition at line 497 of file ixgbe_common.c.
References DEBUGFUNC, DEBUGOUT1, ixgbe_mac_operations::init_led_link_act, IXGBE_ERR_SFP_NOT_PRESENT, IXGBE_SUCCESS, ixgbe_hw::mac, ixgbe_mac_info::ops, ixgbe_mac_operations::reset_hw, and ixgbe_mac_operations::start_hw.
Referenced by ixgbe_init_ops_generic().
ixgbe_init_led_link_act_generic - Store the LED index link/activity. @hw: pointer to hardware structure
Store the index for the link active LED. This will be used to support blinking the LED.
Definition at line 1163 of file ixgbe_common.c.
References IXGBE_LED_LINK_ACTIVE, IXGBE_LED_MODE_MASK_BASE, IXGBE_LED_MODE_SHIFT, IXGBE_LEDCTL, ixgbe_mac_X550EM_a, ixgbe_mac_X550EM_x, IXGBE_READ_REG, IXGBE_SUCCESS, ixgbe_mac_info::led_link_act, ixgbe_hw::mac, and ixgbe_mac_info::type.
Referenced by ixgbe_init_ops_generic().
ixgbe_init_ops_generic - Inits function ptrs @hw: pointer to the hardware structure
Initialize the function pointers.
Definition at line 70 of file ixgbe_common.c.
References ixgbe_mac_operations::acquire_swfw_sync, ixgbe_mac_operations::blink_led_start, ixgbe_mac_operations::blink_led_stop, ixgbe_eeprom_operations::calc_checksum, ixgbe_mac_operations::check_link, ixgbe_mac_operations::clear_hw_cntrs, ixgbe_mac_operations::clear_rar, ixgbe_mac_operations::clear_vfta, ixgbe_mac_operations::clear_vmdq, DEBUGFUNC, ixgbe_mac_operations::disable_mc, ixgbe_mac_operations::disable_rx, ixgbe_mac_operations::dmac_config, ixgbe_mac_operations::dmac_config_tcs, ixgbe_mac_operations::dmac_update_tcs, ixgbe_hw::eeprom, ixgbe_mac_operations::enable_mc, ixgbe_mac_operations::enable_rx, ixgbe_mac_operations::enable_rx_dma, ixgbe_mac_operations::fc_autoneg, ixgbe_mac_operations::fc_enable, ixgbe_mac_operations::get_bus_info, ixgbe_mac_operations::get_link_capabilities, ixgbe_mac_operations::get_mac_addr, ixgbe_mac_operations::get_media_type, ixgbe_mac_operations::get_supported_physical_layer, ixgbe_mac_operations::init_hw, ixgbe_mac_operations::init_led_link_act, ixgbe_eeprom_operations::init_params, ixgbe_mac_operations::init_rx_addrs, ixgbe_mac_operations::init_uta_tables, ixgbe_mac_operations::insert_mac_addr, ixgbe_acquire_swfw_sync(), ixgbe_blink_led_start_generic(), ixgbe_blink_led_stop_generic(), ixgbe_calc_eeprom_checksum_generic(), ixgbe_clear_hw_cntrs_generic(), ixgbe_clear_rar_generic(), ixgbe_disable_mc_generic(), ixgbe_disable_rx_generic(), IXGBE_EEC_BY_MAC, IXGBE_EEC_PRES, ixgbe_enable_mc_generic(), ixgbe_enable_rx_dma_generic(), ixgbe_enable_rx_generic(), ixgbe_fc_autoneg(), ixgbe_fc_enable_generic(), ixgbe_get_bus_info_generic(), ixgbe_get_mac_addr_generic(), ixgbe_init_eeprom_params_generic(), ixgbe_init_hw_generic(), ixgbe_init_led_link_act_generic(), ixgbe_init_rx_addrs_generic(), ixgbe_led_off_generic(), ixgbe_led_on_generic(), ixgbe_read_eeprom_bit_bang_generic(), ixgbe_read_eeprom_buffer_bit_bang_generic(), ixgbe_read_eerd_buffer_generic(), ixgbe_read_eerd_generic(), IXGBE_READ_REG, ixgbe_release_swfw_sync(), ixgbe_set_lan_id_multi_port_pcie(), ixgbe_set_rar_generic(), ixgbe_setup_fc_generic(), ixgbe_start_hw_generic(), ixgbe_stop_adapter_generic(), IXGBE_SUCCESS, ixgbe_update_eeprom_checksum_generic(), ixgbe_update_mc_addr_list_generic(), ixgbe_update_uc_addr_list_generic(), ixgbe_validate_eeprom_checksum_generic(), ixgbe_write_eeprom_buffer_bit_bang_generic(), ixgbe_write_eeprom_generic(), ixgbe_mac_operations::led_off, ixgbe_mac_operations::led_on, ixgbe_hw::mac, ixgbe_eeprom_info::ops, ixgbe_mac_info::ops, ixgbe_mac_operations::prot_autoc_read, prot_autoc_read_generic(), ixgbe_mac_operations::prot_autoc_write, prot_autoc_write_generic(), ixgbe_eeprom_operations::read, ixgbe_eeprom_operations::read_buffer, ixgbe_mac_operations::release_swfw_sync, ixgbe_mac_operations::reset_hw, ixgbe_mac_operations::set_lan_id, ixgbe_mac_operations::set_rar, ixgbe_mac_operations::set_vfta, ixgbe_mac_operations::set_vlvf, ixgbe_mac_operations::set_vmdq, ixgbe_mac_operations::setup_fc, ixgbe_mac_operations::setup_link, ixgbe_mac_operations::start_hw, ixgbe_mac_operations::stop_adapter, ixgbe_eeprom_operations::update_checksum, ixgbe_mac_operations::update_mc_addr_list, ixgbe_mac_operations::update_uc_addr_list, ixgbe_eeprom_operations::validate_checksum, ixgbe_eeprom_operations::write, and ixgbe_eeprom_operations::write_buffer.
Referenced by ixgbe_init_ops_82598(), ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_init_rx_addrs_generic - Initializes receive address filters. @hw: pointer to hardware structure
Places the MAC address in receive address register 0 and clears the rest of the receive address registers. Clears the multicast table. Assumes the receiver is in reset when the routine is called.
Definition at line 2475 of file ixgbe_common.c.
References ixgbe_mac_info::addr, ixgbe_hw::addr_ctrl, ixgbe_mac_operations::clear_vmdq, DEBUGFUNC, DEBUGOUT, DEBUGOUT1, DEBUGOUT3, ixgbe_mac_operations::get_mac_addr, IXGBE_CLEAR_VMDQ_ALL, IXGBE_ERR_INVALID_MAC_ADDR, ixgbe_init_uta_tables(), IXGBE_MCSTCTRL, IXGBE_MTA, IXGBE_RAH, IXGBE_RAH_AV, IXGBE_RAL, IXGBE_SUCCESS, ixgbe_validate_mac_addr(), IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_mac_info::mc_filter_type, ixgbe_mac_info::mcft_size, ixgbe_addr_filter_info::mta_in_use, ixgbe_mac_info::num_rar_entries, ixgbe_mac_info::ops, ixgbe_addr_filter_info::overflow_promisc, ixgbe_addr_filter_info::rar_used_count, and ixgbe_mac_operations::set_rar.
Referenced by ixgbe_init_ops_generic().
ixgbe_init_thermal_sensor_thresh_generic - Inits thermal sensor thresholds @hw: pointer to hardware structure
Inits the thermal sensor thresholds according to the NVM map and save off the threshold and location values into mac.thermal_sensor_data
Definition at line 4949 of file ixgbe_common.c.
References ixgbe_thermal_diode_data::caution_thresh, DEBUGFUNC, ixgbe_hw::eeprom, ERROR_REPORT2, ixgbe_emc_therm_limit, IXGBE_ERROR_INVALID_STATE, IXGBE_ETS_CFG, IXGBE_ETS_DATA_HTHRESH_MASK, IXGBE_ETS_DATA_INDEX_MASK, IXGBE_ETS_DATA_INDEX_SHIFT, IXGBE_ETS_DATA_LOC_MASK, IXGBE_ETS_DATA_LOC_SHIFT, IXGBE_ETS_LTHRES_DELTA_MASK, IXGBE_ETS_LTHRES_DELTA_SHIFT, IXGBE_ETS_NUM_SENSORS_MASK, IXGBE_ETS_TYPE_EMC, IXGBE_ETS_TYPE_MASK, IXGBE_ETS_TYPE_SHIFT, IXGBE_I2C_THERMAL_SENSOR_ADDR, ixgbe_mac_82599EB, IXGBE_MAX_SENSORS, IXGBE_NOT_IMPLEMENTED, IXGBE_READ_REG, IXGBE_STATUS, IXGBE_STATUS_LAN_ID_1, IXGBE_SUCCESS, ixgbe_thermal_diode_data::location, ixgbe_hw::mac, ixgbe_thermal_diode_data::max_op_thresh, ixgbe_eeprom_info::ops, ixgbe_phy_info::ops, ixgbe_hw::phy, ixgbe_eeprom_operations::read, ixgbe_thermal_sensor_data::sensor, ixgbe_mac_info::thermal_sensor_data, ixgbe_mac_info::type, and ixgbe_phy_operations::write_i2c_byte.
Referenced by ixgbe_init_ops_82599().
ixgbe_init_uta_tables_generic - Initialize the Unicast Table Array @hw: pointer to hardware structure
Definition at line 3900 of file ixgbe_common.c.
References DEBUGFUNC, DEBUGOUT, IXGBE_SUCCESS, IXGBE_UTA, and IXGBE_WRITE_REG.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_insert_mac_addr_generic - Find a RAR for this mac address @hw: pointer to hardware structure @addr: Address to put into receive address register @vmdq: VMDq pool to assign
Puts an ethernet address into a receive address register, or finds the rar that it is already in; adds to the pool list
Definition at line 3723 of file ixgbe_common.c.
References DEBUGFUNC, ixgbe_clear_vmdq(), IXGBE_ERR_INVALID_MAC_ADDR, IXGBE_RAH, IXGBE_RAH_AV, IXGBE_RAL, IXGBE_READ_REG, ixgbe_set_rar(), ixgbe_set_vmdq(), ixgbe_hw::mac, ixgbe_mac_info::num_rar_entries, and ixgbe_mac_info::rar_highwater.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_led_off_generic - Turns off the software controllable LEDs. @hw: pointer to hardware structure @index: led number to turn off
Definition at line 1225 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_ERR_PARAM, IXGBE_LED_MODE_SHIFT, IXGBE_LED_OFF, IXGBE_LEDCTL, IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_WRITE_FLUSH, and IXGBE_WRITE_REG.
Referenced by ixgbe_init_ops_generic(), and ixgbe_led_off_t_X550em().
ixgbe_led_on_generic - Turns on the software controllable LEDs. @hw: pointer to hardware structure @index: led number to turn on
Definition at line 1202 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_ERR_PARAM, IXGBE_LED_MODE_SHIFT, IXGBE_LED_ON, IXGBE_LEDCTL, IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_WRITE_FLUSH, and IXGBE_WRITE_REG.
Referenced by ixgbe_init_ops_generic(), and ixgbe_led_on_t_X550em().
ixgbe_lower_eeprom_clk - Lowers the EEPROM's clock input. @hw: pointer to hardware structure @eec: EEC's current value
Definition at line 2162 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_EEC_BY_MAC, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, and usec_delay.
Referenced by ixgbe_shift_in_eeprom_bits(), and ixgbe_shift_out_eeprom_bits().
ixgbe_mng_enabled - Is the manageability engine enabled? @hw: pointer to hardware structure
Returns true if the manageability engine is enabled.
Definition at line 5462 of file ixgbe_common.c.
References IXGBE_FACTPS_BY_MAC, IXGBE_FACTPS_MNGCG, IXGBE_FWSM_BY_MAC, IXGBE_FWSM_FW_MODE_PT, IXGBE_FWSM_MODE_MASK, ixgbe_mac_X540, IXGBE_MANC, IXGBE_MANC_RCV_TCO_EN, IXGBE_READ_REG, ixgbe_hw::mac, and ixgbe_mac_info::type.
Referenced by ixgbe_init_mac_link_ops_82599(), and ixgbe_reset_hw_82599().
ixgbe_mng_present - returns true when management capability is present @hw: pointer to hardware structure
Definition at line 5444 of file ixgbe_common.c.
References IXGBE_FWSM_BY_MAC, IXGBE_FWSM_FW_MODE_PT, ixgbe_mac_82599EB, IXGBE_READ_REG, ixgbe_hw::mac, and ixgbe_mac_info::type.
Referenced by ixgbe_enter_lplu_t_x550em(), ixgbe_set_copper_phy_power(), and ixgbe_stop_mac_link_on_d3_82599().
ixgbe_mta_vector - Determines bit-vector in multicast table to set @hw: pointer to hardware structure @mc_addr: the multicast address
Extracts the 12 bits, from a multicast address, to determine which bit-vector to set in the multicast table. The hardware uses 12 bits, from incoming rx multicast addresses, to determine the bit-vector to check in the MTA. Which of the 4 combination, of 12-bits, the hardware uses is set by the MO field of the MCSTCTRL. The MO field is set during initialization to mc_filter_type.
Definition at line 2652 of file ixgbe_common.c.
References ASSERT, DEBUGFUNC, DEBUGOUT, ixgbe_hw::mac, and ixgbe_mac_info::mc_filter_type.
Referenced by ixgbe_set_mta().
ixgbe_need_crosstalk_fix - Determine if we need to do cross talk fix @hw: pointer to hardware structure
Contains the logic to identify if we need to verify link for the crosstalk fix
Definition at line 4148 of file ixgbe_common.c.
References ixgbe_mac_operations::get_media_type, ixgbe_media_type_fiber, ixgbe_media_type_fiber_qsfp, ixgbe_hw::mac, ixgbe_hw::need_crosstalk_fix, and ixgbe_mac_info::ops.
Referenced by ixgbe_check_mac_link_generic().
s32 ixgbe_negotiate_fc | ( | struct ixgbe_hw * | hw, |
u32 | adv_reg, | ||
u32 | lp_reg, | ||
u32 | adv_sym, | ||
u32 | adv_asm, | ||
u32 | lp_sym, | ||
u32 | lp_asm | ||
) |
ixgbe_negotiate_fc - Negotiate flow control @hw: pointer to hardware structure @adv_reg: flow control advertised settings @lp_reg: link partner's flow control settings @adv_sym: symmetric pause bit in advertisement @adv_asm: asymmetric pause bit in advertisement @lp_sym: symmetric pause bit in link partner advertisement @lp_asm: asymmetric pause bit in link partner advertisement
Find the intersection between advertised settings and link partner's advertised settings
Definition at line 2951 of file ixgbe_common.c.
References ixgbe_fc_info::current_mode, DEBUGOUT, ERROR_REPORT3, ixgbe_hw::fc, IXGBE_ERR_FC_NOT_NEGOTIATED, IXGBE_ERROR_UNSUPPORTED, ixgbe_fc_full, ixgbe_fc_none, ixgbe_fc_rx_pause, ixgbe_fc_tx_pause, IXGBE_SUCCESS, and ixgbe_fc_info::requested_mode.
Referenced by ixgbe_fc_autoneg_backplane(), ixgbe_fc_autoneg_backplane_x550em_a(), ixgbe_fc_autoneg_copper(), ixgbe_fc_autoneg_fiber(), and ixgbe_fc_autoneg_sgmii_x550em_a().
Definition at line 3174 of file ixgbe_common.c.
References IXGBE_PCI_DEVICE_CONTROL2, IXGBE_PCIDEVCTRL2_16_32ms, IXGBE_PCIDEVCTRL2_16_32ms_def, IXGBE_PCIDEVCTRL2_17_34s, IXGBE_PCIDEVCTRL2_1_2ms, IXGBE_PCIDEVCTRL2_1_2s, IXGBE_PCIDEVCTRL2_260_520ms, IXGBE_PCIDEVCTRL2_4_8s, IXGBE_PCIDEVCTRL2_50_100us, IXGBE_PCIDEVCTRL2_65_130ms, IXGBE_PCIDEVCTRL2_TIMEO_MASK, and IXGBE_READ_PCIE_WORD.
Referenced by ixgbe_clear_tx_pending(), and ixgbe_disable_pcie_master().
ixgbe_poll_eerd_eewr_done - Poll EERD read or EEWR write status @hw: pointer to hardware structure @ee_reg: EEPROM flag for polling
Polls the status bit (bit 1) of the EERD or EEWR to determine when the read or write is done respectively.
Definition at line 1783 of file ixgbe_common.c.
References DEBUGFUNC, ERROR_REPORT1, IXGBE_EEPROM_RW_REG_DONE, IXGBE_EERD, IXGBE_EERD_EEWR_ATTEMPTS, IXGBE_EEWR, IXGBE_ERR_EEPROM, IXGBE_ERROR_POLLING, IXGBE_NVM_POLL_READ, IXGBE_READ_REG, IXGBE_SUCCESS, and usec_delay.
Referenced by ixgbe_read_eerd_buffer_generic(), and ixgbe_write_eewr_buffer_generic().
ixgbe_raise_eeprom_clk - Raises the EEPROM's clock input. @hw: pointer to hardware structure @eec: EEC register's current value
Definition at line 2143 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_EEC_BY_MAC, IXGBE_EEC_SK, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, and usec_delay.
Referenced by ixgbe_shift_in_eeprom_bits(), and ixgbe_shift_out_eeprom_bits().
ixgbe_read_eeprom_bit_bang_generic - Read EEPROM word using bit-bang @hw: pointer to hardware structure @offset: offset within the EEPROM to be read @data: read 16 bit value from EEPROM
Reads 16 bit value from EEPROM through bit-bang method
Definition at line 1578 of file ixgbe_common.c.
References DEBUGFUNC, ixgbe_hw::eeprom, ixgbe_eeprom_operations::init_params, IXGBE_ERR_EEPROM, ixgbe_read_eeprom_buffer_bit_bang(), ixgbe_eeprom_info::ops, and ixgbe_eeprom_info::word_size.
Referenced by ixgbe_init_ops_generic(), and ixgbe_read_eeprom_82599().
|
static |
ixgbe_read_eeprom_buffer_bit_bang - Read EEPROM using bit-bang @hw: pointer to hardware structure @offset: offset within the EEPROM to be read @words: number of word(s) @data: read 16 bit word(s) from EEPROM
Reads 16 bit word(s) from EEPROM through bit-bang method
Definition at line 1521 of file ixgbe_common.c.
References ixgbe_eeprom_info::address_bits, DEBUGFUNC, ixgbe_hw::eeprom, ixgbe_acquire_eeprom(), IXGBE_EEPROM_A8_OPCODE_SPI, IXGBE_EEPROM_OPCODE_BITS, IXGBE_EEPROM_READ_OPCODE_SPI, IXGBE_ERR_EEPROM, ixgbe_ready_eeprom(), ixgbe_release_eeprom(), ixgbe_shift_in_eeprom_bits(), ixgbe_shift_out_eeprom_bits(), ixgbe_standby_eeprom(), and IXGBE_SUCCESS.
Referenced by ixgbe_detect_eeprom_page_size_generic(), ixgbe_read_eeprom_bit_bang_generic(), and ixgbe_read_eeprom_buffer_bit_bang_generic().
s32 ixgbe_read_eeprom_buffer_bit_bang_generic | ( | struct ixgbe_hw * | hw, |
u16 | offset, | ||
u16 | words, | ||
u16 * | data | ||
) |
ixgbe_read_eeprom_buffer_bit_bang_generic - Read EEPROM using bit-bang @hw: pointer to hardware structure @offset: offset within the EEPROM to be read @data: read 16 bit words(s) from EEPROM @words: number of word(s)
Reads 16 bit word(s) from EEPROM through bit-bang method
Definition at line 1472 of file ixgbe_common.c.
References DEBUGFUNC, ixgbe_hw::eeprom, ixgbe_eeprom_operations::init_params, IXGBE_EEPROM_RD_BUFFER_MAX_COUNT, IXGBE_ERR_EEPROM, IXGBE_ERR_INVALID_ARGUMENT, ixgbe_read_eeprom_buffer_bit_bang(), IXGBE_SUCCESS, ixgbe_eeprom_info::ops, and ixgbe_eeprom_info::word_size.
Referenced by ixgbe_init_ops_generic(), and ixgbe_read_eeprom_buffer_82599().
ixgbe_read_eerd_buffer_generic - Read EEPROM word(s) using EERD @hw: pointer to hardware structure @offset: offset of word in the EEPROM to read @words: number of word(s) @data: 16 bit word(s) from the EEPROM
Reads a 16 bit word(s) from the EEPROM using the EERD register.
Definition at line 1607 of file ixgbe_common.c.
References DEBUGFUNC, DEBUGOUT, ixgbe_hw::eeprom, ERROR_REPORT1, ixgbe_eeprom_operations::init_params, IXGBE_EEPROM_RW_ADDR_SHIFT, IXGBE_EEPROM_RW_REG_DATA, IXGBE_EEPROM_RW_REG_START, IXGBE_EERD, IXGBE_ERR_EEPROM, IXGBE_ERR_INVALID_ARGUMENT, IXGBE_ERROR_ARGUMENT, IXGBE_NVM_POLL_READ, ixgbe_poll_eerd_eewr_done(), IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_WRITE_REG, ixgbe_eeprom_info::ops, and ixgbe_eeprom_info::word_size.
Referenced by ixgbe_init_ops_generic(), ixgbe_read_eeprom_buffer_82599(), ixgbe_read_eerd_buffer_X540(), and ixgbe_read_eerd_generic().
ixgbe_read_eerd_generic - Read EEPROM word using EERD @hw: pointer to hardware structure @offset: offset of word in the EEPROM to read @data: word read from the EEPROM
Reads a 16 bit word from the EEPROM using the EERD register.
Definition at line 1701 of file ixgbe_common.c.
References ixgbe_read_eerd_buffer_generic().
Referenced by ixgbe_calc_eeprom_checksum_X540(), ixgbe_init_ops_generic(), ixgbe_read_eeprom_82599(), ixgbe_read_eerd_X540(), and ixgbe_validate_eeprom_checksum_X540().
ixgbe_read_pba_num_generic - Reads part number from EEPROM @hw: pointer to hardware structure @pba_num: stores the part number from the EEPROM
Reads the part number from the EEPROM.
Definition at line 753 of file ixgbe_common.c.
References DEBUGFUNC, DEBUGOUT, ixgbe_hw::eeprom, IXGBE_NOT_IMPLEMENTED, IXGBE_PBANUM0_PTR, IXGBE_PBANUM1_PTR, IXGBE_PBANUM_PTR_GUARD, IXGBE_SUCCESS, ixgbe_eeprom_info::ops, and ixgbe_eeprom_operations::read.
Referenced by ixgbe_read_pba_num().
s32 ixgbe_read_pba_raw | ( | struct ixgbe_hw * | hw, |
u16 * | eeprom_buf, | ||
u32 | eeprom_buf_size, | ||
u16 | max_pba_block_size, | ||
struct ixgbe_pba * | pba | ||
) |
ixgbe_read_pba_raw @hw: pointer to the HW structure @eeprom_buf: optional pointer to EEPROM image @eeprom_buf_size: size of EEPROM image in words @max_pba_block_size: PBA block size limit @pba: pointer to output PBA structure
Reads PBA from EEPROM image when eeprom_buf is not NULL. Reads PBA from physical EEPROM device when eeprom_buf is NULL.
Definition at line 792 of file ixgbe_common.c.
References ixgbe_hw::eeprom, IXGBE_ERR_PARAM, ixgbe_get_pba_block_size(), IXGBE_PBANUM0_PTR, IXGBE_PBANUM1_PTR, IXGBE_PBANUM_PTR_GUARD, IXGBE_SUCCESS, ixgbe_eeprom_info::ops, ixgbe_pba::pba_block, ixgbe_eeprom_operations::read_buffer, and ixgbe_pba::word.
ixgbe_read_pba_string_generic - Reads part number string from EEPROM @hw: pointer to hardware structure @pba_num: stores the part number string from the EEPROM @pba_num_size: part number string buffer length
Reads the part number string from the EEPROM.
Definition at line 643 of file ixgbe_common.c.
References DEBUGFUNC, DEBUGOUT, ixgbe_hw::eeprom, IXGBE_ERR_INVALID_ARGUMENT, IXGBE_ERR_NO_SPACE, IXGBE_ERR_PBA_SECTION, IXGBE_PBANUM0_PTR, IXGBE_PBANUM1_PTR, IXGBE_PBANUM_PTR_GUARD, IXGBE_SUCCESS, ixgbe_eeprom_info::ops, and ixgbe_eeprom_operations::read.
Referenced by ixgbe_read_pba_string().
ixgbe_ready_eeprom - Polls for EEPROM ready @hw: pointer to hardware structure
Definition at line 1981 of file ixgbe_common.c.
References DEBUGFUNC, DEBUGOUT, IXGBE_EEPROM_MAX_RETRY_SPI, IXGBE_EEPROM_OPCODE_BITS, IXGBE_EEPROM_RDSR_OPCODE_SPI, IXGBE_EEPROM_STATUS_RDY_SPI, IXGBE_ERR_EEPROM, ixgbe_shift_in_eeprom_bits(), ixgbe_shift_out_eeprom_bits(), ixgbe_standby_eeprom(), IXGBE_SUCCESS, and usec_delay.
Referenced by ixgbe_read_eeprom_buffer_bit_bang(), and ixgbe_write_eeprom_buffer_bit_bang().
|
static |
ixgbe_release_eeprom - Release EEPROM, release semaphores @hw: pointer to hardware structure
Definition at line 2180 of file ixgbe_common.c.
References DEBUGFUNC, ixgbe_hw::eeprom, IXGBE_EEC_BY_MAC, IXGBE_EEC_CS, IXGBE_GSSR_EEP_SM, IXGBE_READ_REG, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, ixgbe_hw::mac, msec_delay, ixgbe_mac_info::ops, ixgbe_mac_operations::release_swfw_sync, ixgbe_eeprom_info::semaphore_delay, and usec_delay.
Referenced by ixgbe_read_eeprom_buffer_bit_bang(), and ixgbe_write_eeprom_buffer_bit_bang().
|
static |
ixgbe_release_eeprom_semaphore - Release hardware semaphore @hw: pointer to hardware structure
This function clears hardware semaphore bits.
Definition at line 1963 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_READ_REG, IXGBE_SWSM, IXGBE_SWSM_SMBI, IXGBE_SWSM_SWESMBI, IXGBE_WRITE_FLUSH, and IXGBE_WRITE_REG.
Referenced by ixgbe_acquire_swfw_sync(), ixgbe_get_eeprom_semaphore(), and ixgbe_release_swfw_sync().
ixgbe_release_swfw_sync - Release SWFW semaphore @hw: pointer to hardware structure @mask: Mask to specify which semaphore to release
Releases the SWFW semaphore through the GSSR register for the specified function (CSR, PHY0, PHY1, EEPROM, Flash)
Definition at line 3334 of file ixgbe_common.c.
References DEBUGFUNC, ixgbe_get_eeprom_semaphore(), IXGBE_GSSR, IXGBE_READ_REG, ixgbe_release_eeprom_semaphore(), and IXGBE_WRITE_REG.
Referenced by ixgbe_acquire_swfw_sync(), and ixgbe_init_ops_generic().
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 | ||
) |
ixgbe_set_fw_drv_ver_generic - Sends driver version to firmware @hw: pointer to the HW structure @maj: driver version major number @min: driver version minor number @build: driver version build number @sub: driver version sub build number @len: unused @driver_ver: unused
Sends driver version number to firmware through the manageability block. On success return IXGBE_SUCCESS else returns IXGBE_ERR_SWFW_SYNC when encountering an error acquiring semaphore or IXGBE_ERR_HOST_INTERFACE_COMMAND when command fails.
Definition at line 4689 of file ixgbe_common.c.
References ixgbe_hic_hdr::buf_len, ixgbe_hw::bus, ixgbe_hic_hdr::checksum, ixgbe_hic_hdr::cmd, ixgbe_hic_hdr::cmd_or_resp, ixgbe_hic_hdr::cmd_resv, DEBUGFUNC, ixgbe_bus_info::func, FW_CEM_CMD_DRIVER_INFO, FW_CEM_CMD_DRIVER_INFO_LEN, FW_CEM_CMD_RESERVED, FW_CEM_HDR_LEN, FW_CEM_MAX_RETRIES, FW_CEM_RESP_STATUS_SUCCESS, ixgbe_hic_drv_info::hdr, ixgbe_calculate_checksum(), IXGBE_ERR_HOST_INTERFACE_COMMAND, IXGBE_HI_COMMAND_TIMEOUT, ixgbe_host_interface_command(), IXGBE_SUCCESS, ixgbe_hic_drv_info::pad, ixgbe_hic_drv_info::pad2, ixgbe_hic_drv_info::port_num, UNREFERENCED_2PARAMETER, ixgbe_hic_drv_info::ver_build, ixgbe_hic_drv_info::ver_maj, ixgbe_hic_drv_info::ver_min, and ixgbe_hic_drv_info::ver_sub.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
void ixgbe_set_lan_id_multi_port_pcie | ( | struct ixgbe_hw * | hw | ) |
ixgbe_set_lan_id_multi_port_pcie - Set LAN id for PCIe multiple port devices @hw: pointer to the HW structure
Determines the LAN function id by reading memory-mapped registers and swaps the port value if requested, and set MAC instance for devices that share CS4227.
Definition at line 1077 of file ixgbe_common.c.
References ixgbe_hw::bus, DEBUGFUNC, ixgbe_hw::device_id, ixgbe_hw::eeprom, ixgbe_bus_info::func, ixgbe_bus_info::instance_id, IXGBE_DEV_ID_X550EM_A_SFP, IXGBE_EE_CTRL_4_INST_ID, IXGBE_EE_CTRL_4_INST_ID_SHIFT, IXGBE_EEPROM_CTRL_4, IXGBE_FACTPS_BY_MAC, IXGBE_FACTPS_LFS, IXGBE_READ_REG, IXGBE_STATUS, IXGBE_STATUS_LAN_ID, IXGBE_STATUS_LAN_ID_SHIFT, ixgbe_bus_info::lan_id, ixgbe_eeprom_info::ops, and ixgbe_eeprom_operations::read.
Referenced by ixgbe_init_ops_generic(), and ixgbe_set_lan_id_multi_port_pcie_82598().
ixgbe_set_mac_anti_spoofing - Enable/Disable MAC anti-spoofing @hw: pointer to hardware structure @enable: enable or disable switch for MAC anti-spoofing @vf: Virtual Function pool - VF Pool to set for MAC anti-spoofing
Definition at line 4386 of file ixgbe_common.c.
References ixgbe_mac_82598EB, IXGBE_PFVFSPOOF, IXGBE_READ_REG, IXGBE_WRITE_REG, ixgbe_hw::mac, and ixgbe_mac_info::type.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_set_mta - Set bit-vector in multicast table @hw: pointer to hardware structure @mc_addr: Multicast address
Sets the bit-vector in the multicast table.
Definition at line 2689 of file ixgbe_common.c.
References ixgbe_hw::addr_ctrl, DEBUGFUNC, DEBUGOUT1, ixgbe_mta_vector(), ixgbe_hw::mac, ixgbe_addr_filter_info::mta_in_use, and ixgbe_mac_info::mta_shadow.
Referenced by ixgbe_update_mc_addr_list_generic().
ixgbe_set_pci_config_data_generic - Generic store PCI bus info @hw: pointer to hardware structure @link_status: the link status returned by the PCI config space
Stores the PCI bus info (speed, width, type) within the ixgbe_hw structure
Definition at line 1005 of file ixgbe_common.c.
References ixgbe_hw::bus, ixgbe_bus_speed_2500, ixgbe_bus_speed_5000, ixgbe_bus_speed_8000, ixgbe_bus_speed_unknown, ixgbe_bus_type_pci_express, ixgbe_bus_type_unknown, ixgbe_bus_width_pcie_x1, ixgbe_bus_width_pcie_x2, ixgbe_bus_width_pcie_x4, ixgbe_bus_width_pcie_x8, ixgbe_bus_width_unknown, IXGBE_PCI_LINK_SPEED, IXGBE_PCI_LINK_SPEED_2500, IXGBE_PCI_LINK_SPEED_5000, IXGBE_PCI_LINK_SPEED_8000, IXGBE_PCI_LINK_WIDTH, IXGBE_PCI_LINK_WIDTH_1, IXGBE_PCI_LINK_WIDTH_2, IXGBE_PCI_LINK_WIDTH_4, IXGBE_PCI_LINK_WIDTH_8, ixgbe_hw::mac, ixgbe_mac_info::ops, ixgbe_mac_operations::set_lan_id, ixgbe_bus_info::speed, ixgbe_bus_info::type, and ixgbe_bus_info::width.
Referenced by ixgbe_get_bus_info_generic(), and ixgbe_get_slot_info().
ixgbe_set_rar_generic - Set Rx address register @hw: pointer to hardware structure @index: Receive address register to write @addr: Address to put into receive address register @vmdq: VMDq "set" or "pool" index @enable_addr: set flag that address is active
Puts an ethernet address into a receive address register.
Definition at line 2385 of file ixgbe_common.c.
References DEBUGFUNC, ERROR_REPORT2, IXGBE_ERR_INVALID_ARGUMENT, IXGBE_ERROR_ARGUMENT, IXGBE_RAH, IXGBE_RAH_AV, IXGBE_RAL, IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_mac_info::num_rar_entries, ixgbe_mac_info::ops, and ixgbe_mac_operations::set_vmdq.
Referenced by ixgbe_init_ops_generic().
ixgbe_set_rxpba_generic - Initialize Rx packet buffer @hw: pointer to hardware structure @num_pb: number of packet buffers to allocate @headroom: reserve n KB of headroom @strategy: packet buffer allocation strategy
Definition at line 4741 of file ixgbe_common.c.
References IXGBE_MAX_PB, IXGBE_RXPBSIZE, IXGBE_RXPBSIZE_SHIFT, IXGBE_TXPBSIZE, IXGBE_TXPBSIZE_MAX, IXGBE_TXPBTHRESH, IXGBE_TXPKT_SIZE_MAX, IXGBE_WRITE_REG, ixgbe_hw::mac, PBA_STRATEGY_EQUAL, PBA_STRATEGY_WEIGHTED, and ixgbe_mac_info::rx_pb_size.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_set_san_mac_addr_generic - Write the SAN MAC address to the EEPROM @hw: pointer to hardware structure @san_mac_addr: SAN MAC address
Write a SAN MAC address to the EEPROM.
Definition at line 3640 of file ixgbe_common.c.
References ixgbe_hw::bus, DEBUGFUNC, ixgbe_hw::eeprom, ixgbe_bus_info::func, IXGBE_ERR_NO_SAN_ADDR_PTR, ixgbe_get_san_mac_addr_offset(), IXGBE_SAN_MAC_ADDR_PORT0_OFFSET, IXGBE_SAN_MAC_ADDR_PORT1_OFFSET, IXGBE_SUCCESS, ixgbe_hw::mac, ixgbe_eeprom_info::ops, ixgbe_mac_info::ops, ixgbe_mac_operations::set_lan_id, and ixgbe_eeprom_operations::write.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
void ixgbe_set_soft_rate_select_speed | ( | struct ixgbe_hw * | hw, |
ixgbe_link_speed | speed | ||
) |
ixgbe_set_soft_rate_select_speed - Set module link speed @hw: pointer to hardware structure @speed: link speed to set
Set module link speed via the soft rate select.
Definition at line 5637 of file ixgbe_common.c.
References DEBUGOUT, IXGBE_I2C_EEPROM_DEV_ADDR2, IXGBE_LINK_SPEED_10GB_FULL, IXGBE_LINK_SPEED_1GB_FULL, IXGBE_SFF_SFF_8472_ESCB, IXGBE_SFF_SFF_8472_OSCB, IXGBE_SFF_SOFT_RS_SELECT_10G, IXGBE_SFF_SOFT_RS_SELECT_1G, ixgbe_phy_info::ops, ixgbe_hw::phy, ixgbe_phy_operations::read_i2c_byte, and ixgbe_phy_operations::write_i2c_byte.
Referenced by ixgbe_init_mac_link_ops_82599(), and ixgbe_init_mac_link_ops_X550em().
s32 ixgbe_set_vfta_generic | ( | struct ixgbe_hw * | hw, |
u32 | vlan, | ||
u32 | vind, | ||
bool | vlan_on, | ||
bool | vlvf_bypass | ||
) |
ixgbe_set_vfta_generic - Set VLAN filter table @hw: pointer to hardware structure @vlan: VLAN id to write to VLAN filter @vind: VMDq output index that maps queue to VLAN id in VLVFB @vlan_on: boolean flag to turn on/off VLAN @vlvf_bypass: boolean flag indicating updating default pool is okay
Turn on/off specified VLAN in the VLAN filter table.
Definition at line 3974 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_ERR_PARAM, IXGBE_READ_REG, ixgbe_set_vlvf_generic(), IXGBE_SUCCESS, IXGBE_VFTA, and IXGBE_WRITE_REG.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_set_vlan_anti_spoofing - Enable/Disable VLAN anti-spoofing @hw: pointer to hardware structure @enable: enable or disable switch for VLAN anti-spoofing @vf: Virtual Function pool - VF Pool to set for VLAN anti-spoofing
Definition at line 4410 of file ixgbe_common.c.
References ixgbe_mac_82598EB, IXGBE_PFVFSPOOF, IXGBE_READ_REG, IXGBE_SPOOF_VLANAS_SHIFT, IXGBE_WRITE_REG, ixgbe_hw::mac, and ixgbe_mac_info::type.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
s32 ixgbe_set_vlvf_generic | ( | struct ixgbe_hw * | hw, |
u32 | vlan, | ||
u32 | vind, | ||
bool | vlan_on, | ||
u32 * | vfta_delta, | ||
u32 | vfta, | ||
bool | vlvf_bypass | ||
) |
ixgbe_set_vlvf_generic - Set VLAN Pool Filter @hw: pointer to hardware structure @vlan: VLAN id to write to VLAN filter @vind: VMDq output index that maps queue to VLAN id in VLVFB @vlan_on: boolean flag to turn on/off VLAN in VLVF @vfta_delta: pointer to the difference between the current value of VFTA and the desired value @vfta: the desired value of the VFTA @vlvf_bypass: boolean flag indicating updating default pool is okay
Turn on/off specified bit in VLVF table.
Definition at line 4041 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_ERR_PARAM, ixgbe_find_vlvf_slot(), IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_VFTA, IXGBE_VLVF, IXGBE_VLVF_VIEN, IXGBE_VLVFB, IXGBE_VT_CTL, IXGBE_VT_CTL_VT_ENABLE, and IXGBE_WRITE_REG.
Referenced by ixgbe_init_ops_82599(), ixgbe_init_ops_X540(), and ixgbe_set_vfta_generic().
ixgbe_set_vmdq_generic - Associate a VMDq pool index with a rx address @hw: pointer to hardware struct @rar: receive address register index to associate with a VMDq index @vmdq: VMDq pool index
Definition at line 3843 of file ixgbe_common.c.
References DEBUGFUNC, ERROR_REPORT2, IXGBE_ERR_INVALID_ARGUMENT, IXGBE_ERROR_ARGUMENT, IXGBE_MPSAR_HI, IXGBE_MPSAR_LO, IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_WRITE_REG, ixgbe_hw::mac, and ixgbe_mac_info::num_rar_entries.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
This function should only be involved in the IOV mode. In IOV mode, Default pool is next pool after the number of VFs advertized and not 0. MPSAR table needs to be updated for SAN_MAC RAR [hw->mac.san_mac_rar_index]
ixgbe_set_vmdq_san_mac - Associate default VMDq pool index with a rx address @hw: pointer to hardware struct @vmdq: VMDq pool index
Definition at line 3879 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_MPSAR_HI, IXGBE_MPSAR_LO, IXGBE_SUCCESS, IXGBE_WRITE_REG, ixgbe_hw::mac, and ixgbe_mac_info::san_mac_rar_index.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
ixgbe_setup_fc_generic - Set up flow control @hw: pointer to hardware structure
Called at init time to set up flow control.
Definition at line 236 of file ixgbe_common.c.
References DEBUGFUNC, DEBUGOUT1, ERROR_REPORT1, ixgbe_hw::fc, IXGBE_AUTOC_AN_RESTART, IXGBE_AUTOC_ASM_PAUSE, IXGBE_AUTOC_SYM_PAUSE, ixgbe_device_supports_autoneg_fc(), IXGBE_ERR_CONFIG, IXGBE_ERR_INVALID_LINK_SETTINGS, IXGBE_ERROR_ARGUMENT, IXGBE_ERROR_UNSUPPORTED, ixgbe_fc_default, ixgbe_fc_full, ixgbe_fc_none, ixgbe_fc_rx_pause, ixgbe_fc_tx_pause, ixgbe_mac_X540, IXGBE_MDIO_AUTO_NEG_ADVT, IXGBE_MDIO_AUTO_NEG_DEV_TYPE, ixgbe_media_type_backplane, ixgbe_media_type_copper, ixgbe_media_type_fiber, ixgbe_media_type_fiber_fixed, ixgbe_media_type_fiber_qsfp, IXGBE_PCS1GANA, IXGBE_PCS1GANA_ASM_PAUSE, IXGBE_PCS1GANA_SYM_PAUSE, IXGBE_PCS1GLCTL, IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_TAF_ASM_PAUSE, IXGBE_TAF_SYM_PAUSE, IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_phy_info::media_type, ixgbe_mac_info::ops, ixgbe_phy_info::ops, ixgbe_hw::phy, ixgbe_mac_operations::prot_autoc_read, ixgbe_mac_operations::prot_autoc_write, ixgbe_phy_operations::read_reg, ixgbe_fc_info::requested_mode, ixgbe_fc_info::strict_ieee, ixgbe_mac_info::type, and ixgbe_phy_operations::write_reg.
Referenced by ixgbe_init_ops_generic(), and ixgbe_init_ops_X550EM().
s32 ixgbe_setup_mac_link_multispeed_fiber | ( | struct ixgbe_hw * | hw, |
ixgbe_link_speed | speed, | ||
bool | autoneg_wait_to_complete | ||
) |
ixgbe_setup_mac_link_multispeed_fiber - Set MAC link speed @hw: pointer to hardware structure @speed: new link speed @autoneg_wait_to_complete: true when waiting for completion is needed
Set the link speed in the MAC and/or PHY register and restarts link.
Definition at line 5491 of file ixgbe_common.c.
References ixgbe_phy_info::autoneg_advertised, DEBUGFUNC, DEBUGOUT, ixgbe_check_link(), ixgbe_flap_tx_laser(), ixgbe_get_link_capabilities(), IXGBE_LINK_SPEED_10GB_FULL, IXGBE_LINK_SPEED_1GB_FULL, IXGBE_LINK_SPEED_UNKNOWN, ixgbe_media_type_fiber, ixgbe_media_type_fiber_fixed, ixgbe_media_type_fiber_qsfp, ixgbe_set_rate_select_speed(), ixgbe_setup_mac_link(), ixgbe_setup_mac_link_multispeed_fiber(), IXGBE_SUCCESS, ixgbe_phy_info::media_type, msec_delay, and ixgbe_hw::phy.
Referenced by ixgbe_init_mac_link_ops_82599(), ixgbe_init_mac_link_ops_X550em(), and ixgbe_setup_mac_link_multispeed_fiber().
ixgbe_shift_in_eeprom_bits - Shift data bits in from the EEPROM @hw: pointer to hardware structure @count: number of bits to shift
Definition at line 2103 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_EEC_BY_MAC, IXGBE_EEC_DI, IXGBE_EEC_DO, ixgbe_lower_eeprom_clk(), ixgbe_raise_eeprom_clk(), and IXGBE_READ_REG.
Referenced by ixgbe_read_eeprom_buffer_bit_bang(), and ixgbe_ready_eeprom().
ixgbe_shift_out_eeprom_bits - Shift data bits out to the EEPROM. @hw: pointer to hardware structure @data: data to send to the EEPROM @count: number of bits to shift out
Definition at line 2047 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_EEC_BY_MAC, IXGBE_EEC_DI, ixgbe_lower_eeprom_clk(), ixgbe_raise_eeprom_clk(), IXGBE_READ_REG, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, and usec_delay.
Referenced by ixgbe_read_eeprom_buffer_bit_bang(), ixgbe_ready_eeprom(), and ixgbe_write_eeprom_buffer_bit_bang().
|
static |
ixgbe_standby_eeprom - Returns EEPROM to a "standby" state @hw: pointer to hardware structure
Definition at line 2022 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_EEC_BY_MAC, IXGBE_EEC_CS, IXGBE_READ_REG, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, and usec_delay.
Referenced by ixgbe_read_eeprom_buffer_bit_bang(), ixgbe_ready_eeprom(), and ixgbe_write_eeprom_buffer_bit_bang().
void ixgbe_start_hw_gen2 | ( | struct ixgbe_hw * | hw | ) |
ixgbe_start_hw_gen2 - Init sequence for common device family @hw: pointer to hw structure
Performs the init sequence common to the second generation of 10 GbE devices. Devices in the second generation: 82599 X540
Definition at line 460 of file ixgbe_common.c.
References IXGBE_DCA_RXCTRL, IXGBE_DCA_RXCTRL_DATA_WRO_EN, IXGBE_DCA_RXCTRL_HEAD_WRO_EN, IXGBE_DCA_TXCTRL_82599, IXGBE_READ_REG, IXGBE_RTTBCNRC, IXGBE_RTTDQSEL, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_mac_info::max_rx_queues, and ixgbe_mac_info::max_tx_queues.
Referenced by ixgbe_start_hw_82599(), and ixgbe_start_hw_X540().
ixgbe_start_hw_generic - Prepare hardware for Tx/Rx @hw: pointer to hardware structure
Starts the hardware by filling the bus info structure and media type, clears all on chip counters, initializes receive address registers, multicast table, VLAN filter table, calls routine to set up link and flow control settings, and leaves transmit and receive units disabled and uninitialized
Definition at line 396 of file ixgbe_common.c.
References ixgbe_hw::adapter_stopped, ixgbe_mac_operations::clear_hw_cntrs, ixgbe_mac_operations::clear_vfta, DEBUGFUNC, DEBUGOUT1, ixgbe_mac_operations::get_device_caps, ixgbe_mac_operations::get_media_type, IXGBE_CTRL_EXT, IXGBE_CTRL_EXT_NS_DIS, IXGBE_DEVICE_CAPS_NO_CROSSTALK_WR, ixgbe_mac_82599EB, ixgbe_mac_X550EM_a, ixgbe_mac_X550EM_x, IXGBE_NOT_IMPLEMENTED, IXGBE_READ_REG, ixgbe_setup_fc(), IXGBE_SUCCESS, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_phy_info::media_type, ixgbe_hw::need_crosstalk_fix, ixgbe_mac_info::ops, ixgbe_hw::phy, and ixgbe_mac_info::type.
Referenced by ixgbe_init_ops_generic(), ixgbe_start_hw_82598(), ixgbe_start_hw_82599(), and ixgbe_start_hw_X540().
ixgbe_stop_adapter_generic - Generic stop Tx/Rx units @hw: pointer to hardware structure
Sets the adapter_stopped flag within ixgbe_hw struct. Clears interrupts, disables transmit and receive units. The adapter_stopped flag is used by the shared code and drivers to determine if the adapter is in a stopped state and should not touch the hardware.
Definition at line 1111 of file ixgbe_common.c.
References ixgbe_hw::adapter_stopped, DEBUGFUNC, ixgbe_disable_pcie_master(), ixgbe_disable_rx(), IXGBE_EICR, IXGBE_EIMC, IXGBE_IRQ_CLEAR_MASK, IXGBE_READ_REG, IXGBE_RXDCTL, IXGBE_RXDCTL_SWFLSH, IXGBE_TXDCTL, IXGBE_TXDCTL_SWFLSH, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_mac_info::max_rx_queues, ixgbe_mac_info::max_tx_queues, and msec_delay.
Referenced by ixgbe_init_ops_generic().
ixgbe_update_eeprom_checksum_generic - Updates the EEPROM checksum @hw: pointer to hardware structure
Definition at line 2321 of file ixgbe_common.c.
References ixgbe_eeprom_operations::calc_checksum, DEBUGFUNC, DEBUGOUT, ixgbe_hw::eeprom, IXGBE_EEPROM_CHECKSUM, ixgbe_eeprom_info::ops, ixgbe_eeprom_operations::read, and ixgbe_eeprom_operations::write.
Referenced by ixgbe_init_ops_generic().
s32 ixgbe_update_mc_addr_list_generic | ( | struct ixgbe_hw * | hw, |
u8 * | mc_addr_list, | ||
u32 | mc_addr_count, | ||
ixgbe_mc_addr_itr | next, | ||
bool | clear | ||
) |
ixgbe_update_mc_addr_list_generic - Updates MAC list of multicast addresses @hw: pointer to hardware structure @mc_addr_list: the list of new multicast addresses @mc_addr_count: number of addresses @next: iterator function to walk the multicast address list @clear: flag, when set clears the table beforehand
When the clear flag is set, the given list replaces any existing list. Hashes the given addresses into the multicast table.
Definition at line 2727 of file ixgbe_common.c.
References ixgbe_hw::addr_ctrl, DEBUGFUNC, DEBUGOUT, IXGBE_MCSTCTRL, IXGBE_MCSTCTRL_MFE, IXGBE_MTA, ixgbe_set_mta(), IXGBE_SUCCESS, IXGBE_WRITE_REG, IXGBE_WRITE_REG_ARRAY, ixgbe_hw::mac, ixgbe_mac_info::mc_filter_type, ixgbe_mac_info::mcft_size, ixgbe_addr_filter_info::mta_in_use, ixgbe_mac_info::mta_shadow, and ixgbe_addr_filter_info::num_mc_addrs.
Referenced by ixgbe_init_ops_generic().
s32 ixgbe_update_uc_addr_list_generic | ( | struct ixgbe_hw * | hw, |
u8 * | addr_list, | ||
u32 | addr_count, | ||
ixgbe_mc_addr_itr | next | ||
) |
ixgbe_update_uc_addr_list_generic - Updates MAC list of secondary addresses @hw: pointer to hardware structure @addr_list: the list of new addresses @addr_count: number of addresses @next: iterator function to walk the address list
The given list replaces any existing list. Clears the secondary addrs from receive address registers. Uses unused receive address registers for the first secondary addresses, and falls back to promiscuous mode as needed.
Drivers using secondary unicast addresses must set user_set_promisc when manually putting the device into promiscuous mode.
Definition at line 2584 of file ixgbe_common.c.
References ixgbe_hw::addr_ctrl, DEBUGFUNC, DEBUGOUT, DEBUGOUT1, ixgbe_add_uc_addr(), IXGBE_FCTRL, IXGBE_FCTRL_UPE, IXGBE_RAH, IXGBE_RAL, IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_WRITE_REG, ixgbe_addr_filter_info::overflow_promisc, ixgbe_addr_filter_info::rar_used_count, and ixgbe_addr_filter_info::user_set_promisc.
Referenced by ixgbe_init_ops_generic().
ixgbe_validate_eeprom_checksum_generic - Validate EEPROM checksum @hw: pointer to hardware structure @checksum_val: calculated checksum
Performs checksum calculation and validates the EEPROM checksum. If the caller does not need checksum_val, the value can be NULL.
Definition at line 2273 of file ixgbe_common.c.
References ixgbe_eeprom_operations::calc_checksum, DEBUGFUNC, DEBUGOUT, ixgbe_hw::eeprom, IXGBE_EEPROM_CHECKSUM, IXGBE_ERR_EEPROM_CHECKSUM, ixgbe_eeprom_info::ops, and ixgbe_eeprom_operations::read.
Referenced by ixgbe_init_ops_generic().
ixgbe_validate_mac_addr - Validate MAC address @mac_addr: pointer to MAC address.
Tests a MAC address to ensure it is a valid Individual Address.
Definition at line 2355 of file ixgbe_common.c.
References DEBUGFUNC, IXGBE_ERR_INVALID_MAC_ADDR, IXGBE_IS_BROADCAST, IXGBE_IS_MULTICAST, and IXGBE_SUCCESS.
Referenced by ixgbe_init_rx_addrs_generic(), ixgbe_reset_hw_82599(), and ixgbe_reset_hw_X540().
|
static |
ixgbe_write_eeprom_buffer_bit_bang - Writes 16 bit word(s) to EEPROM @hw: pointer to hardware structure @offset: offset within the EEPROM to be written to @words: number of word(s) @data: 16 bit word(s) to be written to the EEPROM
If ixgbe_eeprom_update_checksum is not called after this function, the EEPROM will most likely contain an invalid checksum.
Definition at line 1362 of file ixgbe_common.c.
References ixgbe_eeprom_info::address_bits, DEBUGFUNC, ixgbe_hw::eeprom, ixgbe_acquire_eeprom(), IXGBE_EEPROM_A8_OPCODE_SPI, IXGBE_EEPROM_OPCODE_BITS, IXGBE_EEPROM_WREN_OPCODE_SPI, IXGBE_EEPROM_WRITE_OPCODE_SPI, IXGBE_ERR_EEPROM, ixgbe_ready_eeprom(), ixgbe_release_eeprom(), ixgbe_shift_out_eeprom_bits(), ixgbe_standby_eeprom(), IXGBE_SUCCESS, msec_delay, and ixgbe_eeprom_info::word_page_size.
Referenced by ixgbe_detect_eeprom_page_size_generic(), ixgbe_write_eeprom_buffer_bit_bang_generic(), and ixgbe_write_eeprom_generic().
s32 ixgbe_write_eeprom_buffer_bit_bang_generic | ( | struct ixgbe_hw * | hw, |
u16 | offset, | ||
u16 | words, | ||
u16 * | data | ||
) |
ixgbe_write_eeprom_buffer_bit_bang_generic - Write EEPROM using bit-bang @hw: pointer to hardware structure @offset: offset within the EEPROM to write @words: number of word(s) @data: 16 bit word(s) to write to EEPROM
Reads 16 bit word(s) from EEPROM through bit-bang method
Definition at line 1305 of file ixgbe_common.c.
References DEBUGFUNC, ixgbe_hw::eeprom, ixgbe_eeprom_operations::init_params, ixgbe_detect_eeprom_page_size_generic(), IXGBE_EEPROM_PAGE_SIZE_MAX, IXGBE_EEPROM_RD_BUFFER_MAX_COUNT, IXGBE_ERR_EEPROM, IXGBE_ERR_INVALID_ARGUMENT, IXGBE_SUCCESS, ixgbe_write_eeprom_buffer_bit_bang(), ixgbe_eeprom_info::ops, ixgbe_eeprom_info::word_page_size, and ixgbe_eeprom_info::word_size.
Referenced by ixgbe_init_ops_generic().
ixgbe_write_eeprom_generic - Writes 16 bit value to EEPROM @hw: pointer to hardware structure @offset: offset within the EEPROM to be written to @data: 16 bit word to be written to the EEPROM
If ixgbe_eeprom_update_checksum is not called after this function, the EEPROM will most likely contain an invalid checksum.
Definition at line 1444 of file ixgbe_common.c.
References DEBUGFUNC, ixgbe_hw::eeprom, ixgbe_eeprom_operations::init_params, IXGBE_ERR_EEPROM, ixgbe_write_eeprom_buffer_bit_bang(), ixgbe_eeprom_info::ops, and ixgbe_eeprom_info::word_size.
Referenced by ixgbe_init_ops_generic().
ixgbe_write_eewr_buffer_generic - Write EEPROM word(s) using EEWR @hw: pointer to hardware structure @offset: offset of word in the EEPROM to write @words: number of word(s) @data: word(s) write to the EEPROM
Write a 16 bit word(s) to the EEPROM using the EEWR register.
Definition at line 1715 of file ixgbe_common.c.
References DEBUGFUNC, DEBUGOUT, ixgbe_hw::eeprom, ERROR_REPORT1, ixgbe_eeprom_operations::init_params, IXGBE_EEPROM_RW_ADDR_SHIFT, IXGBE_EEPROM_RW_REG_DATA, IXGBE_EEPROM_RW_REG_START, IXGBE_EEWR, IXGBE_ERR_EEPROM, IXGBE_ERR_INVALID_ARGUMENT, IXGBE_ERROR_ARGUMENT, IXGBE_NVM_POLL_WRITE, ixgbe_poll_eerd_eewr_done(), IXGBE_SUCCESS, IXGBE_WRITE_REG, ixgbe_eeprom_info::ops, and ixgbe_eeprom_info::word_size.
Referenced by ixgbe_write_eewr_buffer_X540(), and ixgbe_write_eewr_generic().
ixgbe_write_eewr_generic - Write EEPROM word using EEWR @hw: pointer to hardware structure @offset: offset of word in the EEPROM to write @data: word write to the EEPROM
Write a 16 bit word to the EEPROM using the EEWR register.
Definition at line 1770 of file ixgbe_common.c.
References ixgbe_write_eewr_buffer_generic().
Referenced by ixgbe_update_eeprom_checksum_X540(), and ixgbe_write_eewr_X540().
s32 ixgbe_write_pba_raw | ( | struct ixgbe_hw * | hw, |
u16 * | eeprom_buf, | ||
u32 | eeprom_buf_size, | ||
struct ixgbe_pba * | pba | ||
) |
ixgbe_write_pba_raw @hw: pointer to the HW structure @eeprom_buf: optional pointer to EEPROM image @eeprom_buf_size: size of EEPROM image in words @pba: pointer to PBA structure
Writes PBA to EEPROM image when eeprom_buf is not NULL. Writes PBA to physical EEPROM device when eeprom_buf is NULL.
Definition at line 861 of file ixgbe_common.c.
References ixgbe_hw::eeprom, IXGBE_ERR_PARAM, IXGBE_PBANUM0_PTR, IXGBE_PBANUM1_PTR, IXGBE_PBANUM_PTR_GUARD, IXGBE_SUCCESS, ixgbe_eeprom_info::ops, ixgbe_pba::pba_block, ixgbe_pba::word, and ixgbe_eeprom_operations::write_buffer.
prot_autoc_read_generic - Hides MAC differences needed for AUTOC read @hw: pointer to hardware structure @locked: bool to indicate whether the SW/FW lock was taken @reg_val: Value we read from AUTOC
The default case requires no protection so just to the register read.
Definition at line 3395 of file ixgbe_common.c.
References IXGBE_AUTOC, IXGBE_READ_REG, and IXGBE_SUCCESS.
Referenced by ixgbe_init_ops_generic().
prot_autoc_write_generic - Hides MAC differences needed for AUTOC write @hw: pointer to hardware structure @reg_val: value to write to AUTOC @locked: bool to indicate whether the SW/FW lock was already taken by previous read.
The default case requires no protection so just to the register write.
Definition at line 3411 of file ixgbe_common.c.
References IXGBE_AUTOC, IXGBE_SUCCESS, IXGBE_WRITE_REG, and UNREFERENCED_1PARAMETER.
Referenced by ixgbe_init_ops_generic().
|
static |
Definition at line 4855 of file ixgbe_common.c.
Referenced by ixgbe_get_thermal_sensor_data_generic().
|
static |
Definition at line 4861 of file ixgbe_common.c.
Referenced by ixgbe_init_thermal_sensor_thresh_generic().