FreeBSD kernel IXGBE device code
ixgbe_common.c File Reference
#include "ixgbe_common.h"
#include "ixgbe_phy.h"
#include "ixgbe_dcb.h"
#include "ixgbe_dcb_82599.h"
#include "ixgbe_api.h"
Include dependency graph for ixgbe_common.c:

Go to the source code of this file.

Macros

#define IXGBE_MAX_SECRX_POLL   4000
 
#define IXGBE_BYPASS_BB_WAIT   1
 

Functions

static s32 ixgbe_acquire_eeprom (struct ixgbe_hw *hw)
 
static s32 ixgbe_get_eeprom_semaphore (struct ixgbe_hw *hw)
 
static void ixgbe_release_eeprom_semaphore (struct ixgbe_hw *hw)
 
static s32 ixgbe_ready_eeprom (struct ixgbe_hw *hw)
 
static void ixgbe_standby_eeprom (struct ixgbe_hw *hw)
 
static void ixgbe_shift_out_eeprom_bits (struct ixgbe_hw *hw, u16 data, u16 count)
 
static u16 ixgbe_shift_in_eeprom_bits (struct ixgbe_hw *hw, u16 count)
 
static void ixgbe_raise_eeprom_clk (struct ixgbe_hw *hw, u32 *eec)
 
static void ixgbe_lower_eeprom_clk (struct ixgbe_hw *hw, u32 *eec)
 
static void ixgbe_release_eeprom (struct ixgbe_hw *hw)
 
static s32 ixgbe_mta_vector (struct ixgbe_hw *hw, u8 *mc_addr)
 
static s32 ixgbe_get_san_mac_addr_offset (struct ixgbe_hw *hw, u16 *san_mac_offset)
 
static s32 ixgbe_read_eeprom_buffer_bit_bang (struct ixgbe_hw *hw, u16 offset, u16 words, u16 *data)
 
static s32 ixgbe_write_eeprom_buffer_bit_bang (struct ixgbe_hw *hw, u16 offset, u16 words, u16 *data)
 
static s32 ixgbe_detect_eeprom_page_size_generic (struct ixgbe_hw *hw, u16 offset)
 
s32 ixgbe_init_ops_generic (struct ixgbe_hw *hw)
 
bool ixgbe_device_supports_autoneg_fc (struct ixgbe_hw *hw)
 
s32 ixgbe_setup_fc_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_start_hw_generic (struct ixgbe_hw *hw)
 
void ixgbe_start_hw_gen2 (struct ixgbe_hw *hw)
 
s32 ixgbe_init_hw_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_clear_hw_cntrs_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_read_pba_string_generic (struct ixgbe_hw *hw, u8 *pba_num, u32 pba_num_size)
 
s32 ixgbe_read_pba_num_generic (struct ixgbe_hw *hw, u32 *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)
 
s32 ixgbe_write_pba_raw (struct ixgbe_hw *hw, u16 *eeprom_buf, u32 eeprom_buf_size, struct ixgbe_pba *pba)
 
s32 ixgbe_get_pba_block_size (struct ixgbe_hw *hw, u16 *eeprom_buf, u32 eeprom_buf_size, u16 *pba_block_size)
 
s32 ixgbe_get_mac_addr_generic (struct ixgbe_hw *hw, u8 *mac_addr)
 
void ixgbe_set_pci_config_data_generic (struct ixgbe_hw *hw, u16 link_status)
 
s32 ixgbe_get_bus_info_generic (struct ixgbe_hw *hw)
 
void ixgbe_set_lan_id_multi_port_pcie (struct ixgbe_hw *hw)
 
s32 ixgbe_stop_adapter_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_init_led_link_act_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_led_on_generic (struct ixgbe_hw *hw, u32 index)
 
s32 ixgbe_led_off_generic (struct ixgbe_hw *hw, u32 index)
 
s32 ixgbe_init_eeprom_params_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_write_eeprom_buffer_bit_bang_generic (struct ixgbe_hw *hw, u16 offset, u16 words, u16 *data)
 
s32 ixgbe_write_eeprom_generic (struct ixgbe_hw *hw, u16 offset, u16 data)
 
s32 ixgbe_read_eeprom_buffer_bit_bang_generic (struct ixgbe_hw *hw, u16 offset, u16 words, u16 *data)
 
s32 ixgbe_read_eeprom_bit_bang_generic (struct ixgbe_hw *hw, u16 offset, u16 *data)
 
s32 ixgbe_read_eerd_buffer_generic (struct ixgbe_hw *hw, u16 offset, u16 words, u16 *data)
 
s32 ixgbe_read_eerd_generic (struct ixgbe_hw *hw, u16 offset, u16 *data)
 
s32 ixgbe_write_eewr_buffer_generic (struct ixgbe_hw *hw, u16 offset, u16 words, u16 *data)
 
s32 ixgbe_write_eewr_generic (struct ixgbe_hw *hw, u16 offset, u16 data)
 
s32 ixgbe_poll_eerd_eewr_done (struct ixgbe_hw *hw, u32 ee_reg)
 
s32 ixgbe_calc_eeprom_checksum_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_validate_eeprom_checksum_generic (struct ixgbe_hw *hw, u16 *checksum_val)
 
s32 ixgbe_update_eeprom_checksum_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_validate_mac_addr (u8 *mac_addr)
 
s32 ixgbe_set_rar_generic (struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq, u32 enable_addr)
 
s32 ixgbe_clear_rar_generic (struct ixgbe_hw *hw, u32 index)
 
s32 ixgbe_init_rx_addrs_generic (struct ixgbe_hw *hw)
 
void ixgbe_add_uc_addr (struct ixgbe_hw *hw, u8 *addr, u32 vmdq)
 
s32 ixgbe_update_uc_addr_list_generic (struct ixgbe_hw *hw, u8 *addr_list, u32 addr_count, ixgbe_mc_addr_itr next)
 
void ixgbe_set_mta (struct ixgbe_hw *hw, u8 *mc_addr)
 
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)
 
s32 ixgbe_enable_mc_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_disable_mc_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_fc_enable_generic (struct ixgbe_hw *hw)
 
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)
 
static s32 ixgbe_fc_autoneg_fiber (struct ixgbe_hw *hw)
 
static s32 ixgbe_fc_autoneg_backplane (struct ixgbe_hw *hw)
 
static s32 ixgbe_fc_autoneg_copper (struct ixgbe_hw *hw)
 
void ixgbe_fc_autoneg (struct ixgbe_hw *hw)
 
static u32 ixgbe_pcie_timeout_poll (struct ixgbe_hw *hw)
 
s32 ixgbe_disable_pcie_master (struct ixgbe_hw *hw)
 
s32 ixgbe_acquire_swfw_sync (struct ixgbe_hw *hw, u32 mask)
 
void ixgbe_release_swfw_sync (struct ixgbe_hw *hw, u32 mask)
 
s32 ixgbe_disable_sec_rx_path_generic (struct ixgbe_hw *hw)
 
s32 prot_autoc_read_generic (struct ixgbe_hw *hw, bool *locked, u32 *reg_val)
 
s32 prot_autoc_write_generic (struct ixgbe_hw *hw, u32 reg_val, bool locked)
 
s32 ixgbe_enable_sec_rx_path_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_enable_rx_dma_generic (struct ixgbe_hw *hw, u32 regval)
 
s32 ixgbe_blink_led_start_generic (struct ixgbe_hw *hw, u32 index)
 
s32 ixgbe_blink_led_stop_generic (struct ixgbe_hw *hw, u32 index)
 
s32 ixgbe_get_san_mac_addr_generic (struct ixgbe_hw *hw, u8 *san_mac_addr)
 
s32 ixgbe_set_san_mac_addr_generic (struct ixgbe_hw *hw, u8 *san_mac_addr)
 
u16 ixgbe_get_pcie_msix_count_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_insert_mac_addr_generic (struct ixgbe_hw *hw, u8 *addr, u32 vmdq)
 
s32 ixgbe_clear_vmdq_generic (struct ixgbe_hw *hw, u32 rar, u32 vmdq)
 
s32 ixgbe_set_vmdq_generic (struct ixgbe_hw *hw, u32 rar, u32 vmdq)
 
s32 ixgbe_set_vmdq_san_mac_generic (struct ixgbe_hw *hw, u32 vmdq)
 
s32 ixgbe_init_uta_tables_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_find_vlvf_slot (struct ixgbe_hw *hw, u32 vlan, bool vlvf_bypass)
 
s32 ixgbe_set_vfta_generic (struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on, bool vlvf_bypass)
 
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_clear_vfta_generic (struct ixgbe_hw *hw)
 
static bool ixgbe_need_crosstalk_fix (struct ixgbe_hw *hw)
 
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_get_wwn_prefix_generic (struct ixgbe_hw *hw, u16 *wwnn_prefix, u16 *wwpn_prefix)
 
s32 ixgbe_get_fcoe_boot_status_generic (struct ixgbe_hw *hw, u16 *bs)
 
void ixgbe_set_mac_anti_spoofing (struct ixgbe_hw *hw, bool enable, int vf)
 
void ixgbe_set_vlan_anti_spoofing (struct ixgbe_hw *hw, bool enable, int vf)
 
s32 ixgbe_get_device_caps_generic (struct ixgbe_hw *hw, u16 *device_caps)
 
void ixgbe_enable_relaxed_ordering_gen2 (struct ixgbe_hw *hw)
 
u8 ixgbe_calculate_checksum (u8 *buffer, u32 length)
 
s32 ixgbe_hic_unlocked (struct ixgbe_hw *hw, u32 *buffer, u32 length, u32 timeout)
 
s32 ixgbe_host_interface_command (struct ixgbe_hw *hw, u32 *buffer, u32 length, u32 timeout, bool return_data)
 
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)
 
void ixgbe_set_rxpba_generic (struct ixgbe_hw *hw, int num_pb, u32 headroom, int strategy)
 
void ixgbe_clear_tx_pending (struct ixgbe_hw *hw)
 
s32 ixgbe_get_thermal_sensor_data_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_init_thermal_sensor_thresh_generic (struct ixgbe_hw *hw)
 
s32 ixgbe_bypass_rw_generic (struct ixgbe_hw *hw, u32 cmd, u32 *status)
 
bool ixgbe_bypass_valid_rd_generic (u32 in_reg, u32 out_reg)
 
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)
 
void ixgbe_get_orom_version (struct ixgbe_hw *hw, struct ixgbe_nvm_version *nvm_ver)
 
void ixgbe_get_oem_prod_version (struct ixgbe_hw *hw, struct ixgbe_nvm_version *nvm_ver)
 
void ixgbe_get_etk_id (struct ixgbe_hw *hw, struct ixgbe_nvm_version *nvm_ver)
 
void ixgbe_dcb_get_rtrup2tc_generic (struct ixgbe_hw *hw, u8 *map)
 
void ixgbe_disable_rx_generic (struct ixgbe_hw *hw)
 
void ixgbe_enable_rx_generic (struct ixgbe_hw *hw)
 
bool ixgbe_mng_present (struct ixgbe_hw *hw)
 
bool ixgbe_mng_enabled (struct ixgbe_hw *hw)
 
s32 ixgbe_setup_mac_link_multispeed_fiber (struct ixgbe_hw *hw, ixgbe_link_speed speed, bool autoneg_wait_to_complete)
 
void ixgbe_set_soft_rate_select_speed (struct ixgbe_hw *hw, ixgbe_link_speed speed)
 

Variables

static const u8 ixgbe_emc_temp_data [4]
 
static const u8 ixgbe_emc_therm_limit [4]
 

Macro Definition Documentation

◆ IXGBE_BYPASS_BB_WAIT

#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.

◆ IXGBE_MAX_SECRX_POLL

#define IXGBE_MAX_SECRX_POLL   4000

Function Documentation

◆ ixgbe_acquire_eeprom()

static s32 ixgbe_acquire_eeprom ( struct ixgbe_hw hw)
static

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().

Here is the caller graph for this function:

◆ ixgbe_acquire_swfw_sync()

s32 ixgbe_acquire_swfw_sync ( struct ixgbe_hw hw,
u32  mask 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_add_uc_addr()

void ixgbe_add_uc_addr ( struct ixgbe_hw hw,
u8 addr,
u32  vmdq 
)

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().

Here is the caller graph for this function:

◆ ixgbe_blink_led_start_generic()

s32 ixgbe_blink_led_start_generic ( struct ixgbe_hw hw,
u32  index 
)

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().

Here is the caller graph for this function:

◆ ixgbe_blink_led_stop_generic()

s32 ixgbe_blink_led_stop_generic ( struct ixgbe_hw hw,
u32  index 
)

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().

Here is the caller graph for this function:

◆ ixgbe_bypass_rd_eep_generic()

s32 ixgbe_bypass_rd_eep_generic ( struct ixgbe_hw hw,
u32  addr,
u8 value 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_bypass_rw_generic()

◆ ixgbe_bypass_set_generic()

s32 ixgbe_bypass_set_generic ( struct ixgbe_hw hw,
u32  ctrl,
u32  event,
u32  action 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_bypass_valid_rd_generic()

bool ixgbe_bypass_valid_rd_generic ( u32  in_reg,
u32  out_reg 
)

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().

Here is the caller graph for this function:

◆ ixgbe_calc_eeprom_checksum_generic()

s32 ixgbe_calc_eeprom_checksum_generic ( struct ixgbe_hw hw)

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().

Here is the caller graph for this function:

◆ ixgbe_calculate_checksum()

u8 ixgbe_calculate_checksum ( u8 buffer,
u32  length 
)

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().

Here is the caller graph for this function:

◆ ixgbe_check_mac_link_generic()

s32 ixgbe_check_mac_link_generic ( struct ixgbe_hw hw,
ixgbe_link_speed speed,
bool link_up,
bool  link_up_wait_to_complete 
)

◆ ixgbe_clear_hw_cntrs_generic()

s32 ixgbe_clear_hw_cntrs_generic ( struct ixgbe_hw hw)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_clear_rar_generic()

s32 ixgbe_clear_rar_generic ( struct ixgbe_hw hw,
u32  index 
)

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().

Here is the caller graph for this function:

◆ ixgbe_clear_tx_pending()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_clear_vfta_generic()

s32 ixgbe_clear_vfta_generic ( struct ixgbe_hw hw)

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().

Here is the caller graph for this function:

◆ ixgbe_clear_vmdq_generic()

s32 ixgbe_clear_vmdq_generic ( struct ixgbe_hw hw,
u32  rar,
u32  vmdq 
)

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().

Here is the caller graph for this function:

◆ ixgbe_dcb_get_rtrup2tc_generic()

void ixgbe_dcb_get_rtrup2tc_generic ( struct ixgbe_hw hw,
u8 map 
)

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().

Here is the caller graph for this function:

◆ ixgbe_detect_eeprom_page_size_generic()

static s32 ixgbe_detect_eeprom_page_size_generic ( struct ixgbe_hw hw,
u16  offset 
)
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_device_supports_autoneg_fc()

◆ ixgbe_disable_mc_generic()

s32 ixgbe_disable_mc_generic ( struct ixgbe_hw hw)

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().

Here is the caller graph for this function:

◆ ixgbe_disable_pcie_master()

s32 ixgbe_disable_pcie_master ( struct ixgbe_hw hw)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_disable_rx_generic()

void ixgbe_disable_rx_generic ( struct ixgbe_hw hw)

◆ ixgbe_disable_sec_rx_path_generic()

s32 ixgbe_disable_sec_rx_path_generic ( struct ixgbe_hw hw)

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().

Here is the caller graph for this function:

◆ ixgbe_enable_mc_generic()

s32 ixgbe_enable_mc_generic ( struct ixgbe_hw hw)

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().

Here is the caller graph for this function:

◆ ixgbe_enable_relaxed_ordering_gen2()

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().

Here is the caller graph for this function:

◆ ixgbe_enable_rx_dma_generic()

s32 ixgbe_enable_rx_dma_generic ( struct ixgbe_hw hw,
u32  regval 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_enable_rx_generic()

void ixgbe_enable_rx_generic ( struct ixgbe_hw hw)

◆ ixgbe_enable_sec_rx_path_generic()

s32 ixgbe_enable_sec_rx_path_generic ( struct ixgbe_hw hw)

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().

Here is the caller graph for this function:

◆ ixgbe_fc_autoneg()

void ixgbe_fc_autoneg ( struct ixgbe_hw hw)

◆ ixgbe_fc_autoneg_backplane()

static s32 ixgbe_fc_autoneg_backplane ( struct ixgbe_hw hw)
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_fc_autoneg_copper()

static s32 ixgbe_fc_autoneg_copper ( struct ixgbe_hw hw)
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_fc_autoneg_fiber()

static s32 ixgbe_fc_autoneg_fiber ( struct ixgbe_hw hw)
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_fc_enable_generic()

◆ ixgbe_find_vlvf_slot()

s32 ixgbe_find_vlvf_slot ( struct ixgbe_hw hw,
u32  vlan,
bool  vlvf_bypass 
)

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().

Here is the caller graph for this function:

◆ ixgbe_get_bus_info_generic()

s32 ixgbe_get_bus_info_generic ( struct ixgbe_hw hw)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_get_device_caps_generic()

s32 ixgbe_get_device_caps_generic ( struct ixgbe_hw hw,
u16 device_caps 
)

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().

Here is the caller graph for this function:

◆ ixgbe_get_eeprom_semaphore()

static s32 ixgbe_get_eeprom_semaphore ( struct ixgbe_hw hw)
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_get_etk_id()

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().

Here is the caller graph for this function:

◆ ixgbe_get_fcoe_boot_status_generic()

s32 ixgbe_get_fcoe_boot_status_generic ( struct ixgbe_hw hw,
u16 bs 
)

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().

Here is the caller graph for this function:

◆ ixgbe_get_mac_addr_generic()

s32 ixgbe_get_mac_addr_generic ( struct ixgbe_hw hw,
u8 mac_addr 
)

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().

Here is the caller graph for this function:

◆ ixgbe_get_oem_prod_version()

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().

Here is the caller graph for this function:

◆ ixgbe_get_orom_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().

Here is the caller graph for this function:

◆ ixgbe_get_pba_block_size()

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().

Here is the caller graph for this function:

◆ ixgbe_get_pcie_msix_count_generic()

u16 ixgbe_get_pcie_msix_count_generic ( struct ixgbe_hw hw)

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().

Here is the caller graph for this function:

◆ ixgbe_get_san_mac_addr_generic()

s32 ixgbe_get_san_mac_addr_generic ( struct ixgbe_hw hw,
u8 san_mac_addr 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_get_san_mac_addr_offset()

static s32 ixgbe_get_san_mac_addr_offset ( struct ixgbe_hw hw,
u16 san_mac_offset 
)
static

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().

Here is the caller graph for this function:

◆ ixgbe_get_thermal_sensor_data_generic()

◆ ixgbe_get_wwn_prefix_generic()

s32 ixgbe_get_wwn_prefix_generic ( struct ixgbe_hw hw,
u16 wwnn_prefix,
u16 wwpn_prefix 
)

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().

Here is the caller graph for this function:

◆ ixgbe_hic_unlocked()

s32 ixgbe_hic_unlocked ( struct ixgbe_hw hw,
u32 buffer,
u32  length,
u32  timeout 
)

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().

Here is the caller graph for this function:

◆ ixgbe_host_interface_command()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_init_eeprom_params_generic()

s32 ixgbe_init_eeprom_params_generic ( struct ixgbe_hw hw)

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().

Here is the caller graph for this function:

◆ ixgbe_init_hw_generic()

s32 ixgbe_init_hw_generic ( struct ixgbe_hw hw)

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().

Here is the caller graph for this function:

◆ ixgbe_init_led_link_act_generic()

s32 ixgbe_init_led_link_act_generic ( struct ixgbe_hw hw)

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().

Here is the caller graph for this function:

◆ ixgbe_init_ops_generic()

s32 ixgbe_init_ops_generic ( struct ixgbe_hw hw)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_init_rx_addrs_generic()

s32 ixgbe_init_rx_addrs_generic ( struct ixgbe_hw hw)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_init_thermal_sensor_thresh_generic()

◆ ixgbe_init_uta_tables_generic()

s32 ixgbe_init_uta_tables_generic ( struct ixgbe_hw hw)

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().

Here is the caller graph for this function:

◆ ixgbe_insert_mac_addr_generic()

s32 ixgbe_insert_mac_addr_generic ( struct ixgbe_hw hw,
u8 addr,
u32  vmdq 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_led_off_generic()

s32 ixgbe_led_off_generic ( struct ixgbe_hw hw,
u32  index 
)

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().

Here is the caller graph for this function:

◆ ixgbe_led_on_generic()

s32 ixgbe_led_on_generic ( struct ixgbe_hw hw,
u32  index 
)

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().

Here is the caller graph for this function:

◆ ixgbe_lower_eeprom_clk()

static void ixgbe_lower_eeprom_clk ( struct ixgbe_hw hw,
u32 eec 
)
static

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().

Here is the caller graph for this function:

◆ ixgbe_mng_enabled()

bool ixgbe_mng_enabled ( struct ixgbe_hw hw)

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().

Here is the caller graph for this function:

◆ ixgbe_mng_present()

bool ixgbe_mng_present ( struct ixgbe_hw hw)

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().

Here is the caller graph for this function:

◆ ixgbe_mta_vector()

static s32 ixgbe_mta_vector ( struct ixgbe_hw hw,
u8 mc_addr 
)
static

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().

Here is the caller graph for this function:

◆ ixgbe_need_crosstalk_fix()

static bool ixgbe_need_crosstalk_fix ( struct ixgbe_hw hw)
static

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().

Here is the caller graph for this function:

◆ ixgbe_negotiate_fc()

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().

Here is the caller graph for this function:

◆ ixgbe_pcie_timeout_poll()

◆ ixgbe_poll_eerd_eewr_done()

s32 ixgbe_poll_eerd_eewr_done ( struct ixgbe_hw hw,
u32  ee_reg 
)

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().

Here is the caller graph for this function:

◆ ixgbe_raise_eeprom_clk()

static void ixgbe_raise_eeprom_clk ( struct ixgbe_hw hw,
u32 eec 
)
static

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().

Here is the caller graph for this function:

◆ ixgbe_read_eeprom_bit_bang_generic()

s32 ixgbe_read_eeprom_bit_bang_generic ( struct ixgbe_hw hw,
u16  offset,
u16 data 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_read_eeprom_buffer_bit_bang()

static s32 ixgbe_read_eeprom_buffer_bit_bang ( struct ixgbe_hw hw,
u16  offset,
u16  words,
u16 data 
)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_read_eerd_buffer_generic()

s32 ixgbe_read_eerd_buffer_generic ( struct ixgbe_hw hw,
u16  offset,
u16  words,
u16 data 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_read_eerd_generic()

s32 ixgbe_read_eerd_generic ( struct ixgbe_hw hw,
u16  offset,
u16 data 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_read_pba_num_generic()

s32 ixgbe_read_pba_num_generic ( struct ixgbe_hw hw,
u32 pba_num 
)

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().

Here is the caller graph for this function:

◆ ixgbe_read_pba_raw()

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.

Here is the call graph for this function:

◆ ixgbe_read_pba_string_generic()

s32 ixgbe_read_pba_string_generic ( struct ixgbe_hw hw,
u8 pba_num,
u32  pba_num_size 
)

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().

Here is the caller graph for this function:

◆ ixgbe_ready_eeprom()

static s32 ixgbe_ready_eeprom ( struct ixgbe_hw hw)
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_release_eeprom()

static void ixgbe_release_eeprom ( struct ixgbe_hw hw)
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().

Here is the caller graph for this function:

◆ ixgbe_release_eeprom_semaphore()

static void ixgbe_release_eeprom_semaphore ( struct ixgbe_hw hw)
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().

Here is the caller graph for this function:

◆ ixgbe_release_swfw_sync()

void ixgbe_release_swfw_sync ( struct ixgbe_hw hw,
u32  mask 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_set_fw_drv_ver_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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_set_lan_id_multi_port_pcie()

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().

Here is the caller graph for this function:

◆ ixgbe_set_mac_anti_spoofing()

void ixgbe_set_mac_anti_spoofing ( struct ixgbe_hw hw,
bool  enable,
int  vf 
)

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().

Here is the caller graph for this function:

◆ ixgbe_set_mta()

void ixgbe_set_mta ( struct ixgbe_hw hw,
u8 mc_addr 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_set_pci_config_data_generic()

void ixgbe_set_pci_config_data_generic ( struct ixgbe_hw hw,
u16  link_status 
)

◆ ixgbe_set_rar_generic()

s32 ixgbe_set_rar_generic ( struct ixgbe_hw hw,
u32  index,
u8 addr,
u32  vmdq,
u32  enable_addr 
)

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().

Here is the caller graph for this function:

◆ ixgbe_set_rxpba_generic()

void ixgbe_set_rxpba_generic ( struct ixgbe_hw hw,
int  num_pb,
u32  headroom,
int  strategy 
)

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().

Here is the caller graph for this function:

◆ ixgbe_set_san_mac_addr_generic()

s32 ixgbe_set_san_mac_addr_generic ( struct ixgbe_hw hw,
u8 san_mac_addr 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_set_soft_rate_select_speed()

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().

Here is the caller graph for this function:

◆ ixgbe_set_vfta_generic()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_set_vlan_anti_spoofing()

void ixgbe_set_vlan_anti_spoofing ( struct ixgbe_hw hw,
bool  enable,
int  vf 
)

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().

Here is the caller graph for this function:

◆ ixgbe_set_vlvf_generic()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_set_vmdq_generic()

s32 ixgbe_set_vmdq_generic ( struct ixgbe_hw hw,
u32  rar,
u32  vmdq 
)

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().

Here is the caller graph for this function:

◆ ixgbe_set_vmdq_san_mac_generic()

s32 ixgbe_set_vmdq_san_mac_generic ( struct ixgbe_hw hw,
u32  vmdq 
)

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().

Here is the caller graph for this function:

◆ ixgbe_setup_fc_generic()

◆ ixgbe_setup_mac_link_multispeed_fiber()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_shift_in_eeprom_bits()

static u16 ixgbe_shift_in_eeprom_bits ( struct ixgbe_hw hw,
u16  count 
)
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_shift_out_eeprom_bits()

static void ixgbe_shift_out_eeprom_bits ( struct ixgbe_hw hw,
u16  data,
u16  count 
)
static

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_standby_eeprom()

static void ixgbe_standby_eeprom ( struct ixgbe_hw hw)
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().

Here is the caller graph for this function:

◆ ixgbe_start_hw_gen2()

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().

Here is the caller graph for this function:

◆ ixgbe_start_hw_generic()

s32 ixgbe_start_hw_generic ( struct ixgbe_hw hw)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_stop_adapter_generic()

s32 ixgbe_stop_adapter_generic ( struct ixgbe_hw hw)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_update_eeprom_checksum_generic()

s32 ixgbe_update_eeprom_checksum_generic ( struct ixgbe_hw hw)

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().

Here is the caller graph for this function:

◆ ixgbe_update_mc_addr_list_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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_update_uc_addr_list_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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_validate_eeprom_checksum_generic()

s32 ixgbe_validate_eeprom_checksum_generic ( struct ixgbe_hw hw,
u16 checksum_val 
)

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().

Here is the caller graph for this function:

◆ ixgbe_validate_mac_addr()

s32 ixgbe_validate_mac_addr ( u8 mac_addr)

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().

Here is the caller graph for this function:

◆ ixgbe_write_eeprom_buffer_bit_bang()

static s32 ixgbe_write_eeprom_buffer_bit_bang ( struct ixgbe_hw hw,
u16  offset,
u16  words,
u16 data 
)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_write_eeprom_buffer_bit_bang_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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_write_eeprom_generic()

s32 ixgbe_write_eeprom_generic ( struct ixgbe_hw hw,
u16  offset,
u16  data 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_write_eewr_buffer_generic()

s32 ixgbe_write_eewr_buffer_generic ( struct ixgbe_hw hw,
u16  offset,
u16  words,
u16 data 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_write_eewr_generic()

s32 ixgbe_write_eewr_generic ( struct ixgbe_hw hw,
u16  offset,
u16  data 
)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ixgbe_write_pba_raw()

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()

s32 prot_autoc_read_generic ( struct ixgbe_hw hw,
bool locked,
u32 reg_val 
)

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().

Here is the caller graph for this function:

◆ prot_autoc_write_generic()

s32 prot_autoc_write_generic ( struct ixgbe_hw hw,
u32  reg_val,
bool  locked 
)

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().

Here is the caller graph for this function:

Variable Documentation

◆ ixgbe_emc_temp_data

const u8 ixgbe_emc_temp_data[4]
static
Initial value:
= {
}
#define IXGBE_EMC_INTERNAL_DATA
Definition: ixgbe_common.h:182
#define IXGBE_EMC_DIODE3_DATA
Definition: ixgbe_common.h:188
#define IXGBE_EMC_DIODE2_DATA
Definition: ixgbe_common.h:186
#define IXGBE_EMC_DIODE1_DATA
Definition: ixgbe_common.h:184

Definition at line 4855 of file ixgbe_common.c.

Referenced by ixgbe_get_thermal_sensor_data_generic().

◆ ixgbe_emc_therm_limit

const u8 ixgbe_emc_therm_limit[4]
static
Initial value:
= {
}
#define IXGBE_EMC_DIODE2_THERM_LIMIT
Definition: ixgbe_common.h:187
#define IXGBE_EMC_DIODE1_THERM_LIMIT
Definition: ixgbe_common.h:185
#define IXGBE_EMC_INTERNAL_THERM_LIMIT
Definition: ixgbe_common.h:183
#define IXGBE_EMC_DIODE3_THERM_LIMIT
Definition: ixgbe_common.h:189

Definition at line 4861 of file ixgbe_common.c.

Referenced by ixgbe_init_thermal_sensor_thresh_generic().