FreeBSD kernel IXGBE device code
ixgbe_x540.h File Reference
#include "ixgbe_type.h"
Include dependency graph for ixgbe_x540.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

s32 ixgbe_get_link_capabilities_X540 (struct ixgbe_hw *hw, ixgbe_link_speed *speed, bool *autoneg)
 
enum ixgbe_media_type ixgbe_get_media_type_X540 (struct ixgbe_hw *hw)
 
s32 ixgbe_setup_mac_link_X540 (struct ixgbe_hw *hw, ixgbe_link_speed speed, bool link_up_wait_to_complete)
 
s32 ixgbe_reset_hw_X540 (struct ixgbe_hw *hw)
 
s32 ixgbe_start_hw_X540 (struct ixgbe_hw *hw)
 
u64 ixgbe_get_supported_physical_layer_X540 (struct ixgbe_hw *hw)
 
s32 ixgbe_init_eeprom_params_X540 (struct ixgbe_hw *hw)
 
s32 ixgbe_read_eerd_X540 (struct ixgbe_hw *hw, u16 offset, u16 *data)
 
s32 ixgbe_read_eerd_buffer_X540 (struct ixgbe_hw *hw, u16 offset, u16 words, u16 *data)
 
s32 ixgbe_write_eewr_X540 (struct ixgbe_hw *hw, u16 offset, u16 data)
 
s32 ixgbe_write_eewr_buffer_X540 (struct ixgbe_hw *hw, u16 offset, u16 words, u16 *data)
 
s32 ixgbe_update_eeprom_checksum_X540 (struct ixgbe_hw *hw)
 
s32 ixgbe_validate_eeprom_checksum_X540 (struct ixgbe_hw *hw, u16 *checksum_val)
 
s32 ixgbe_calc_eeprom_checksum_X540 (struct ixgbe_hw *hw)
 
s32 ixgbe_update_flash_X540 (struct ixgbe_hw *hw)
 
s32 ixgbe_acquire_swfw_sync_X540 (struct ixgbe_hw *hw, u32 mask)
 
void ixgbe_release_swfw_sync_X540 (struct ixgbe_hw *hw, u32 mask)
 
void ixgbe_init_swfw_sync_X540 (struct ixgbe_hw *hw)
 
s32 ixgbe_blink_led_start_X540 (struct ixgbe_hw *hw, u32 index)
 
s32 ixgbe_blink_led_stop_X540 (struct ixgbe_hw *hw, u32 index)
 

Function Documentation

◆ ixgbe_acquire_swfw_sync_X540()

s32 ixgbe_acquire_swfw_sync_X540 ( struct ixgbe_hw hw,
u32  mask 
)

ixgbe_acquire_swfw_sync_X540 - Acquire SWFW semaphore @hw: pointer to hardware structure @mask: Mask to specify which semaphore to acquire

Acquires the SWFW semaphore thought the SW_FW_SYNC register for the specified function (CSR, PHY0, PHY1, NVM, Flash)

Definition at line 767 of file ixgbe_x540.c.

References DEBUGFUNC, DEBUGOUT, IXGBE_ERR_SWFW_SYNC, ixgbe_get_swfw_sync_semaphore(), IXGBE_GSSR_EEP_SM, IXGBE_GSSR_FLASH_SM, IXGBE_GSSR_I2C_MASK, IXGBE_GSSR_MAC_CSR_SM, IXGBE_GSSR_NVM_PHY_MASK, IXGBE_GSSR_PHY0_SM, IXGBE_GSSR_PHY1_SM, IXGBE_GSSR_SW_MNG_SM, ixgbe_mac_X550, IXGBE_READ_REG, ixgbe_release_swfw_sync_semaphore(), ixgbe_release_swfw_sync_X540(), IXGBE_SUCCESS, IXGBE_SWFW_SYNC_BY_MAC, IXGBE_WRITE_REG, ixgbe_hw::mac, msec_delay, and ixgbe_mac_info::type.

Referenced by ixgbe_acquire_swfw_sync_X550a(), ixgbe_acquire_swfw_sync_X550em(), ixgbe_init_ops_X540(), and ixgbe_init_swfw_sync_X540().

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

◆ ixgbe_blink_led_start_X540()

s32 ixgbe_blink_led_start_X540 ( struct ixgbe_hw hw,
u32  index 
)

ixgbe_blink_led_start_X540 - Blink LED based on index. @hw: pointer to hardware structure @index: led number to blink

Devices that implement the version 2 interface: X540

Definition at line 1004 of file ixgbe_x540.c.

References ixgbe_mac_operations::check_link, DEBUGFUNC, IXGBE_ERR_PARAM, IXGBE_LED_BLINK, IXGBE_LEDCTL, IXGBE_MACC, IXGBE_MACC_FLU, IXGBE_MACC_FS, IXGBE_MACC_FSV_10G, IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, ixgbe_hw::mac, and ixgbe_mac_info::ops.

Referenced by ixgbe_init_ops_X540().

Here is the caller graph for this function:

◆ ixgbe_blink_led_stop_X540()

s32 ixgbe_blink_led_stop_X540 ( struct ixgbe_hw hw,
u32  index 
)

ixgbe_blink_led_stop_X540 - Stop blinking LED based on index. @hw: pointer to hardware structure @index: led number to stop blinking

Devices that implement the version 2 interface: X540

Definition at line 1045 of file ixgbe_x540.c.

References DEBUGFUNC, IXGBE_ERR_PARAM, IXGBE_LED_LINK_ACTIVE, IXGBE_LED_MODE_SHIFT, IXGBE_LEDCTL, IXGBE_MACC, IXGBE_MACC_FLU, IXGBE_MACC_FS, IXGBE_MACC_FSV_10G, IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_WRITE_FLUSH, and IXGBE_WRITE_REG.

Referenced by ixgbe_init_ops_X540().

Here is the caller graph for this function:

◆ ixgbe_calc_eeprom_checksum_X540()

s32 ixgbe_calc_eeprom_checksum_X540 ( struct ixgbe_hw hw)

ixgbe_calc_eeprom_checksum_X540 - Calculates and returns the checksum

This function does not use synchronization for EERD and EEWR. It can be used internally by function which utilize ixgbe_acquire_swfw_sync_X540.

@hw: pointer to hardware structure

Returns a negative error code on error, or the 16-bit checksum

Definition at line 501 of file ixgbe_x540.c.

References DEBUGFUNC, DEBUGOUT, ixgbe_hw::eeprom, IXGBE_EEPROM_CHECKSUM, IXGBE_EEPROM_SUM, IXGBE_ERR_EEPROM, IXGBE_FW_PTR, IXGBE_OPTION_ROM_PTR, IXGBE_PCIE_ANALOG_PTR, IXGBE_PHY_PTR, ixgbe_read_eerd_generic(), and ixgbe_eeprom_info::word_size.

Referenced by ixgbe_init_ops_X540().

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

◆ ixgbe_get_link_capabilities_X540()

s32 ixgbe_get_link_capabilities_X540 ( struct ixgbe_hw hw,
ixgbe_link_speed speed,
bool autoneg 
)

ixgbe_get_link_capabilities_X540 - Determines link capabilities @hw: pointer to hardware structure @speed: pointer to link speed @autoneg: true when autoneg or autotry is enabled

Determines the link capabilities by reading the AUTOC register.

Definition at line 171 of file ixgbe_x540.c.

References ixgbe_get_copper_link_capabilities_generic(), and IXGBE_SUCCESS.

Here is the call graph for this function:

◆ ixgbe_get_media_type_X540()

enum ixgbe_media_type ixgbe_get_media_type_X540 ( struct ixgbe_hw hw)

ixgbe_get_media_type_X540 - Get media type @hw: pointer to hardware structure

Returns the media type (fiber, copper, backplane)

Definition at line 186 of file ixgbe_x540.c.

References ixgbe_media_type_copper, and UNREFERENCED_1PARAMETER.

Referenced by ixgbe_init_ops_X540().

Here is the caller graph for this function:

◆ ixgbe_get_supported_physical_layer_X540()

u64 ixgbe_get_supported_physical_layer_X540 ( struct ixgbe_hw hw)

ixgbe_get_supported_physical_layer_X540 - Returns physical layer type @hw: pointer to hardware structure

Determines physical layer capabilities of the current configuration.

Definition at line 338 of file ixgbe_x540.c.

References DEBUGFUNC, IXGBE_MDIO_PHY_1000BASET_ABILITY, IXGBE_MDIO_PHY_100BASETX_ABILITY, IXGBE_MDIO_PHY_10GBASET_ABILITY, IXGBE_MDIO_PHY_EXT_ABILITY, IXGBE_MDIO_PMA_PMD_DEV_TYPE, IXGBE_PHYSICAL_LAYER_1000BASE_T, IXGBE_PHYSICAL_LAYER_100BASE_TX, IXGBE_PHYSICAL_LAYER_10GBASE_T, IXGBE_PHYSICAL_LAYER_UNKNOWN, ixgbe_phy_info::ops, ixgbe_hw::phy, and ixgbe_phy_operations::read_reg.

Referenced by ixgbe_init_ops_X540().

Here is the caller graph for this function:

◆ ixgbe_init_eeprom_params_X540()

s32 ixgbe_init_eeprom_params_X540 ( struct ixgbe_hw hw)

ixgbe_init_eeprom_params_X540 - 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 364 of file ixgbe_x540.c.

References DEBUGFUNC, DEBUGOUT2, ixgbe_hw::eeprom, IXGBE_EEC_BY_MAC, IXGBE_EEC_SIZE, IXGBE_EEC_SIZE_SHIFT, ixgbe_eeprom_uninitialized, IXGBE_EEPROM_WORD_SIZE_SHIFT, ixgbe_flash, IXGBE_READ_REG, IXGBE_SUCCESS, ixgbe_eeprom_info::semaphore_delay, ixgbe_eeprom_info::type, and ixgbe_eeprom_info::word_size.

Referenced by ixgbe_init_ops_X540(), and ixgbe_init_ops_X550EM().

Here is the caller graph for this function:

◆ ixgbe_init_swfw_sync_X540()

void ixgbe_init_swfw_sync_X540 ( struct ixgbe_hw hw)

ixgbe_init_swfw_sync_X540 - Release hardware semaphore @hw: pointer to hardware structure

This function reset hardware semaphore bits for a semaphore that may have be left locked due to a catastrophic failure.

Definition at line 973 of file ixgbe_x540.c.

References ixgbe_acquire_swfw_sync_X540(), ixgbe_get_swfw_sync_semaphore(), IXGBE_GSSR_EEP_SM, IXGBE_GSSR_I2C_MASK, IXGBE_GSSR_MAC_CSR_SM, IXGBE_GSSR_PHY0_SM, IXGBE_GSSR_PHY1_SM, IXGBE_GSSR_SW_MNG_SM, ixgbe_release_swfw_sync_semaphore(), and ixgbe_release_swfw_sync_X540().

Referenced by ixgbe_init_ops_X540().

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

◆ ixgbe_read_eerd_buffer_X540()

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

ixgbe_read_eerd_buffer_X540- Read EEPROM word(s) using EERD @hw: pointer to hardware structure @offset: offset of word in the EEPROM to read @words: number of words @data: word(s) read from the EEPROM

Reads a 16 bit word(s) from the EEPROM using the EERD register.

Definition at line 422 of file ixgbe_x540.c.

References ixgbe_mac_operations::acquire_swfw_sync, DEBUGFUNC, IXGBE_ERR_SWFW_SYNC, IXGBE_GSSR_EEP_SM, ixgbe_read_eerd_buffer_generic(), IXGBE_SUCCESS, ixgbe_hw::mac, ixgbe_mac_info::ops, and ixgbe_mac_operations::release_swfw_sync.

Referenced by ixgbe_init_ops_X540().

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

◆ ixgbe_read_eerd_X540()

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

ixgbe_read_eerd_X540- 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 397 of file ixgbe_x540.c.

References ixgbe_mac_operations::acquire_swfw_sync, DEBUGFUNC, IXGBE_ERR_SWFW_SYNC, IXGBE_GSSR_EEP_SM, ixgbe_read_eerd_generic(), IXGBE_SUCCESS, ixgbe_hw::mac, ixgbe_mac_info::ops, and ixgbe_mac_operations::release_swfw_sync.

Referenced by ixgbe_init_ops_X540().

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

◆ ixgbe_release_swfw_sync_X540()

void ixgbe_release_swfw_sync_X540 ( struct ixgbe_hw hw,
u32  mask 
)

ixgbe_release_swfw_sync_X540 - Release SWFW semaphore @hw: pointer to hardware structure @mask: Mask to specify which semaphore to release

Releases the SWFW semaphore through the SW_FW_SYNC register for the specified function (CSR, PHY0, PHY1, EVM, Flash)

Definition at line 864 of file ixgbe_x540.c.

References DEBUGFUNC, ixgbe_get_swfw_sync_semaphore(), IXGBE_GSSR_I2C_MASK, IXGBE_GSSR_NVM_PHY_MASK, IXGBE_GSSR_SW_MNG_SM, IXGBE_READ_REG, ixgbe_release_swfw_sync_semaphore(), IXGBE_SWFW_SYNC_BY_MAC, IXGBE_WRITE_REG, and msec_delay.

Referenced by ixgbe_acquire_swfw_sync_X540(), ixgbe_acquire_swfw_sync_X550a(), ixgbe_init_ops_X540(), ixgbe_init_swfw_sync_X540(), ixgbe_release_swfw_sync_X550a(), and ixgbe_release_swfw_sync_X550em().

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

◆ ixgbe_reset_hw_X540()

◆ ixgbe_setup_mac_link_X540()

s32 ixgbe_setup_mac_link_X540 ( struct ixgbe_hw hw,
ixgbe_link_speed  speed,
bool  autoneg_wait_to_complete 
)

ixgbe_setup_mac_link_X540 - Sets the auto advertised capabilities @hw: pointer to hardware structure @speed: new link speed @autoneg_wait_to_complete: true when waiting for completion is needed

Definition at line 198 of file ixgbe_x540.c.

References DEBUGFUNC, ixgbe_phy_info::ops, ixgbe_hw::phy, and ixgbe_phy_operations::setup_link_speed.

Referenced by ixgbe_init_ops_X540().

Here is the caller graph for this function:

◆ ixgbe_start_hw_X540()

s32 ixgbe_start_hw_X540 ( struct ixgbe_hw hw)

ixgbe_start_hw_X540 - Prepare hardware for Tx/Rx @hw: pointer to hardware structure

Starts the hardware using the generic start_hw function and the generation start_hw function. Then performs revision-specific operations, if any.

Definition at line 316 of file ixgbe_x540.c.

References DEBUGFUNC, ixgbe_start_hw_gen2(), ixgbe_start_hw_generic(), and IXGBE_SUCCESS.

Referenced by ixgbe_init_ops_X540().

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

◆ ixgbe_update_eeprom_checksum_X540()

s32 ixgbe_update_eeprom_checksum_X540 ( struct ixgbe_hw hw)

ixgbe_update_eeprom_checksum_X540 - Updates the EEPROM checksum and flash @hw: pointer to hardware structure

After writing EEPROM to shadow RAM using EEWR register, software calculates checksum and updates the EEPROM and instructs the hardware to update the flash.

Definition at line 640 of file ixgbe_x540.c.

References ixgbe_mac_operations::acquire_swfw_sync, ixgbe_eeprom_operations::calc_checksum, DEBUGFUNC, DEBUGOUT, ixgbe_hw::eeprom, IXGBE_EEPROM_CHECKSUM, IXGBE_ERR_SWFW_SYNC, IXGBE_GSSR_EEP_SM, ixgbe_update_flash_X540(), ixgbe_write_eewr_generic(), ixgbe_hw::mac, ixgbe_eeprom_info::ops, ixgbe_mac_info::ops, ixgbe_eeprom_operations::read, and ixgbe_mac_operations::release_swfw_sync.

Referenced by ixgbe_init_ops_X540().

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

◆ ixgbe_update_flash_X540()

s32 ixgbe_update_flash_X540 ( struct ixgbe_hw hw)

ixgbe_update_flash_X540 - Instruct HW to copy EEPROM to Flash device @hw: pointer to hardware structure

Set FLUP (bit 23) of the EEC register to instruct Hardware to copy EEPROM from shadow RAM to the flash device.

Definition at line 688 of file ixgbe_x540.c.

References DEBUGFUNC, DEBUGOUT, IXGBE_EEC_BY_MAC, IXGBE_EEC_FLUP, IXGBE_EEC_SEC1VAL, IXGBE_ERR_EEPROM, ixgbe_mac_X540, ixgbe_poll_flash_update_done_X540(), IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_hw::revision_id, and ixgbe_mac_info::type.

Referenced by ixgbe_update_eeprom_checksum_X540().

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

◆ ixgbe_validate_eeprom_checksum_X540()

s32 ixgbe_validate_eeprom_checksum_X540 ( struct ixgbe_hw hw,
u16 checksum_val 
)

ixgbe_validate_eeprom_checksum_X540 - 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 577 of file ixgbe_x540.c.

References ixgbe_mac_operations::acquire_swfw_sync, ixgbe_eeprom_operations::calc_checksum, DEBUGFUNC, DEBUGOUT, ixgbe_hw::eeprom, ERROR_REPORT1, IXGBE_EEPROM_CHECKSUM, IXGBE_ERR_EEPROM_CHECKSUM, IXGBE_ERR_SWFW_SYNC, IXGBE_ERROR_INVALID_STATE, IXGBE_GSSR_EEP_SM, ixgbe_read_eerd_generic(), ixgbe_hw::mac, ixgbe_eeprom_info::ops, ixgbe_mac_info::ops, ixgbe_eeprom_operations::read, and ixgbe_mac_operations::release_swfw_sync.

Referenced by ixgbe_init_ops_X540().

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

◆ ixgbe_write_eewr_buffer_X540()

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

ixgbe_write_eewr_buffer_X540 - Write EEPROM word(s) using EEWR @hw: pointer to hardware structure @offset: offset of word in the EEPROM to write @words: number of words @data: word(s) write to the EEPROM

Write a 16 bit word(s) to the EEPROM using the EEWR register.

Definition at line 473 of file ixgbe_x540.c.

References ixgbe_mac_operations::acquire_swfw_sync, DEBUGFUNC, IXGBE_ERR_SWFW_SYNC, IXGBE_GSSR_EEP_SM, IXGBE_SUCCESS, ixgbe_write_eewr_buffer_generic(), ixgbe_hw::mac, ixgbe_mac_info::ops, and ixgbe_mac_operations::release_swfw_sync.

Referenced by ixgbe_init_ops_X540().

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

◆ ixgbe_write_eewr_X540()

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

ixgbe_write_eewr_X540 - 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 448 of file ixgbe_x540.c.

References ixgbe_mac_operations::acquire_swfw_sync, DEBUGFUNC, IXGBE_ERR_SWFW_SYNC, IXGBE_GSSR_EEP_SM, IXGBE_SUCCESS, ixgbe_write_eewr_generic(), ixgbe_hw::mac, ixgbe_mac_info::ops, and ixgbe_mac_operations::release_swfw_sync.

Referenced by ixgbe_init_ops_X540().

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