FreeBSD kernel IXGBE device code
ixgbe_82599.h File Reference
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_82599 (struct ixgbe_hw *hw, ixgbe_link_speed *speed, bool *autoneg)
 
enum ixgbe_media_type ixgbe_get_media_type_82599 (struct ixgbe_hw *hw)
 
void ixgbe_disable_tx_laser_multispeed_fiber (struct ixgbe_hw *hw)
 
void ixgbe_enable_tx_laser_multispeed_fiber (struct ixgbe_hw *hw)
 
void ixgbe_flap_tx_laser_multispeed_fiber (struct ixgbe_hw *hw)
 
void ixgbe_set_hard_rate_select_speed (struct ixgbe_hw *hw, ixgbe_link_speed speed)
 
s32 ixgbe_setup_mac_link_smartspeed (struct ixgbe_hw *hw, ixgbe_link_speed speed, bool autoneg_wait_to_complete)
 
s32 ixgbe_start_mac_link_82599 (struct ixgbe_hw *hw, bool autoneg_wait_to_complete)
 
s32 ixgbe_setup_mac_link_82599 (struct ixgbe_hw *hw, ixgbe_link_speed speed, bool autoneg_wait_to_complete)
 
s32 ixgbe_setup_sfp_modules_82599 (struct ixgbe_hw *hw)
 
void ixgbe_init_mac_link_ops_82599 (struct ixgbe_hw *hw)
 
s32 ixgbe_reset_hw_82599 (struct ixgbe_hw *hw)
 
s32 ixgbe_read_analog_reg8_82599 (struct ixgbe_hw *hw, u32 reg, u8 *val)
 
s32 ixgbe_write_analog_reg8_82599 (struct ixgbe_hw *hw, u32 reg, u8 val)
 
s32 ixgbe_start_hw_82599 (struct ixgbe_hw *hw)
 
s32 ixgbe_identify_phy_82599 (struct ixgbe_hw *hw)
 
s32 ixgbe_init_phy_ops_82599 (struct ixgbe_hw *hw)
 
u64 ixgbe_get_supported_physical_layer_82599 (struct ixgbe_hw *hw)
 
s32 ixgbe_enable_rx_dma_82599 (struct ixgbe_hw *hw, u32 regval)
 
s32 prot_autoc_read_82599 (struct ixgbe_hw *hw, bool *locked, u32 *reg_val)
 
s32 prot_autoc_write_82599 (struct ixgbe_hw *hw, u32 reg_val, bool locked)
 

Function Documentation

◆ ixgbe_disable_tx_laser_multispeed_fiber()

void ixgbe_disable_tx_laser_multispeed_fiber ( struct ixgbe_hw hw)

ixgbe_disable_tx_laser_multispeed_fiber - Disable Tx laser @hw: pointer to hardware structure

The base drivers may require better control over SFP+ module PHY states. This includes selectively shutting down the Tx laser on the PHY, effectively halting physical link.

Definition at line 685 of file ixgbe_82599.c.

References ixgbe_check_reset_blocked(), IXGBE_ESDP, IXGBE_ESDP_SDP3, IXGBE_READ_REG, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, and usec_delay.

Referenced by ixgbe_flap_tx_laser_multispeed_fiber(), and ixgbe_init_mac_link_ops_82599().

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

◆ ixgbe_enable_rx_dma_82599()

s32 ixgbe_enable_rx_dma_82599 ( struct ixgbe_hw hw,
u32  regval 
)

ixgbe_enable_rx_dma_82599 - Enable the Rx DMA unit on 82599 @hw: pointer to hardware structure @regval: register value to write to RXCTRL

Enables the Rx DMA unit for 82599

Definition at line 2280 of file ixgbe_82599.c.

References DEBUGFUNC, ixgbe_mac_operations::disable_sec_rx_path, ixgbe_mac_operations::enable_sec_rx_path, ixgbe_disable_rx(), ixgbe_enable_rx(), IXGBE_RXCTRL_RXEN, IXGBE_SUCCESS, ixgbe_hw::mac, and ixgbe_mac_info::ops.

Referenced by ixgbe_init_ops_82599().

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

◆ ixgbe_enable_tx_laser_multispeed_fiber()

void ixgbe_enable_tx_laser_multispeed_fiber ( struct ixgbe_hw hw)

ixgbe_enable_tx_laser_multispeed_fiber - Enable Tx laser @hw: pointer to hardware structure

The base drivers may require better control over SFP+ module PHY states. This includes selectively turning on the Tx laser on the PHY, effectively starting physical link.

Definition at line 708 of file ixgbe_82599.c.

References IXGBE_ESDP, IXGBE_READ_REG, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, and msec_delay.

Referenced by ixgbe_flap_tx_laser_multispeed_fiber(), and ixgbe_init_mac_link_ops_82599().

Here is the caller graph for this function:

◆ ixgbe_flap_tx_laser_multispeed_fiber()

void ixgbe_flap_tx_laser_multispeed_fiber ( struct ixgbe_hw hw)

ixgbe_flap_tx_laser_multispeed_fiber - Flap Tx laser @hw: pointer to hardware structure

When the driver changes the link speeds that it can support, it sets autotry_restart to true to indicate that we need to initiate a new autotry session with the link partner. To do so, we set the speed then disable and re-enable the Tx laser, to alert the link partner that it also needs to restart autotry on its end. This is consistent with true clause 37 autoneg, which also involves a loss of signal.

Definition at line 731 of file ixgbe_82599.c.

References ixgbe_mac_info::autotry_restart, DEBUGFUNC, ixgbe_check_reset_blocked(), ixgbe_disable_tx_laser_multispeed_fiber(), ixgbe_enable_tx_laser_multispeed_fiber(), and ixgbe_hw::mac.

Referenced by ixgbe_init_mac_link_ops_82599().

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

◆ ixgbe_get_link_capabilities_82599()

◆ ixgbe_get_media_type_82599()

◆ ixgbe_get_supported_physical_layer_82599()

u64 ixgbe_get_supported_physical_layer_82599 ( struct ixgbe_hw hw)

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

Determines physical layer capabilities of the current configuration.

Definition at line 2192 of file ixgbe_82599.c.

References DEBUGFUNC, ixgbe_phy_operations::identify, IXGBE_AUTOC, IXGBE_AUTOC2, IXGBE_AUTOC2_10G_KR, IXGBE_AUTOC2_10G_SERIAL_PMA_PMD_MASK, IXGBE_AUTOC2_10G_SFI, IXGBE_AUTOC_10G_CX4, IXGBE_AUTOC_10G_KX4, IXGBE_AUTOC_10G_PMA_PMD_MASK, IXGBE_AUTOC_10G_XAUI, IXGBE_AUTOC_1G_KX_BX, IXGBE_AUTOC_1G_PMA_PMD_MASK, IXGBE_AUTOC_KR_SUPP, IXGBE_AUTOC_KX4_SUPP, IXGBE_AUTOC_KX_SUPP, IXGBE_AUTOC_LMS_10G_LINK_NO_AN, IXGBE_AUTOC_LMS_10G_SERIAL, IXGBE_AUTOC_LMS_1G_AN, IXGBE_AUTOC_LMS_1G_LINK_NO_AN, IXGBE_AUTOC_LMS_KX4_KX_KR, IXGBE_AUTOC_LMS_KX4_KX_KR_1G_AN, IXGBE_AUTOC_LMS_MASK, ixgbe_get_supported_phy_sfp_layer_generic(), 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_phy_cu_unknown, ixgbe_phy_tn, IXGBE_PHYSICAL_LAYER_1000BASE_BX, IXGBE_PHYSICAL_LAYER_1000BASE_KX, IXGBE_PHYSICAL_LAYER_1000BASE_T, IXGBE_PHYSICAL_LAYER_100BASE_TX, IXGBE_PHYSICAL_LAYER_10GBASE_CX4, IXGBE_PHYSICAL_LAYER_10GBASE_KR, IXGBE_PHYSICAL_LAYER_10GBASE_KX4, IXGBE_PHYSICAL_LAYER_10GBASE_T, IXGBE_PHYSICAL_LAYER_10GBASE_XAUI, IXGBE_PHYSICAL_LAYER_UNKNOWN, IXGBE_READ_REG, ixgbe_phy_info::ops, ixgbe_hw::phy, ixgbe_phy_operations::read_reg, and ixgbe_phy_info::type.

Referenced by ixgbe_init_ops_82599().

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

◆ ixgbe_identify_phy_82599()

s32 ixgbe_identify_phy_82599 ( struct ixgbe_hw hw)

ixgbe_identify_phy_82599 - Get physical layer module @hw: pointer to hardware structure

Determines the physical layer module found on the current adapter. If PHY already detected, maintains current PHY type in hw struct, otherwise executes the PHY detection routine.

Definition at line 2157 of file ixgbe_82599.c.

References DEBUGFUNC, ixgbe_mac_operations::get_media_type, IXGBE_ERR_SFP_NOT_SUPPORTED, ixgbe_identify_module_generic(), ixgbe_identify_phy_generic(), ixgbe_media_type_copper, ixgbe_phy_none, ixgbe_phy_sfp_unsupported, ixgbe_phy_unknown, IXGBE_SUCCESS, ixgbe_hw::mac, ixgbe_mac_info::ops, ixgbe_hw::phy, and ixgbe_phy_info::type.

Referenced by ixgbe_init_ops_82599().

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

◆ ixgbe_init_mac_link_ops_82599()

◆ ixgbe_init_phy_ops_82599()

s32 ixgbe_init_phy_ops_82599 ( struct ixgbe_hw hw)

◆ ixgbe_read_analog_reg8_82599()

s32 ixgbe_read_analog_reg8_82599 ( struct ixgbe_hw hw,
u32  reg,
u8 val 
)

ixgbe_read_analog_reg8_82599 - Reads 8 bit Omer analog register @hw: pointer to hardware structure @reg: analog register to read @val: read value

Performs read operation to Omer analog register specified.

Definition at line 2082 of file ixgbe_82599.c.

References DEBUGFUNC, IXGBE_CORECTL, IXGBE_CORECTL_WRITE_CMD, IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, and usec_delay.

Referenced by ixgbe_init_ops_82599().

Here is the caller graph for this function:

◆ ixgbe_reset_hw_82599()

s32 ixgbe_reset_hw_82599 ( struct ixgbe_hw hw)

ixgbe_reset_hw_82599 - Perform hardware reset @hw: pointer to hardware structure

Resets the hardware by resetting the transmit and receive units, masks and clears all interrupts, perform a PHY reset, and perform a link (MAC) reset.

Definition at line 1038 of file ixgbe_82599.c.

References ixgbe_mac_operations::check_link, ixgbe_mac_operations::clear_vmdq, DEBUGFUNC, DEBUGOUT, ixgbe_mac_info::flags, ixgbe_hw::force_full_reset, ixgbe_mac_operations::get_mac_addr, ixgbe_mac_operations::get_san_mac_addr, ixgbe_mac_operations::get_wwn_prefix, ixgbe_phy_operations::init, ixgbe_mac_operations::init_rx_addrs, IXGBE_AUTOC, IXGBE_AUTOC2, IXGBE_AUTOC2_LINK_DISABLE_MASK, IXGBE_AUTOC2_UPPER_MASK, IXGBE_AUTOC_LMS_MASK, ixgbe_clear_tx_pending(), IXGBE_CLEAR_VMDQ_ALL, IXGBE_CTRL, IXGBE_CTRL_LNK_RST, IXGBE_CTRL_RST, IXGBE_CTRL_RST_MASK, IXGBE_ERR_RESET_FAILED, IXGBE_ERR_SFP_NOT_SUPPORTED, IXGBE_FLAGS_DOUBLE_RESET_REQUIRED, ixgbe_mng_enabled(), IXGBE_RAH_AV, IXGBE_READ_REG, IXGBE_SUCCESS, ixgbe_validate_mac_addr(), IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, ixgbe_hw::mac, msec_delay, ixgbe_phy_info::multispeed_fiber, ixgbe_mac_info::num_rar_entries, ixgbe_mac_info::ops, ixgbe_phy_info::ops, ixgbe_mac_info::orig_autoc, ixgbe_mac_info::orig_autoc2, ixgbe_mac_info::orig_link_settings_stored, ixgbe_mac_info::perm_addr, ixgbe_hw::phy, ixgbe_mac_operations::prot_autoc_write, ixgbe_phy_operations::reset, ixgbe_phy_info::reset_disable, ixgbe_mac_info::san_addr, ixgbe_mac_info::san_mac_rar_index, ixgbe_mac_operations::set_rar, ixgbe_mac_operations::setup_sfp, ixgbe_phy_info::sfp_setup_needed, ixgbe_mac_operations::stop_adapter, usec_delay, ixgbe_hw::wol_enabled, ixgbe_mac_info::wwnn_prefix, and ixgbe_mac_info::wwpn_prefix.

Referenced by ixgbe_init_ops_82599().

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

◆ ixgbe_set_hard_rate_select_speed()

void ixgbe_set_hard_rate_select_speed ( struct ixgbe_hw hw,
ixgbe_link_speed  speed 
)

ixgbe_set_hard_rate_select_speed - Set module link speed @hw: pointer to hardware structure @speed: link speed to set

Set module link speed via RS0/RS1 rate select pins.

Definition at line 753 of file ixgbe_82599.c.

References DEBUGOUT, IXGBE_ESDP, IXGBE_ESDP_SDP5, IXGBE_ESDP_SDP5_DIR, IXGBE_LINK_SPEED_10GB_FULL, IXGBE_LINK_SPEED_1GB_FULL, IXGBE_READ_REG, IXGBE_WRITE_FLUSH, and IXGBE_WRITE_REG.

Referenced by ixgbe_init_mac_link_ops_82599().

Here is the caller graph for this function:

◆ ixgbe_setup_mac_link_82599()

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

◆ ixgbe_setup_mac_link_smartspeed()

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

ixgbe_setup_mac_link_smartspeed - Set MAC link speed using SmartSpeed @hw: pointer to hardware structure @speed: new link speed @autoneg_wait_to_complete: true when waiting for completion is needed

Implements the Intel SmartSpeed algorithm.

Definition at line 783 of file ixgbe_82599.c.

References ixgbe_phy_info::autoneg_advertised, DEBUGFUNC, DEBUGOUT, IXGBE_AUTOC, IXGBE_AUTOC_KR_SUPP, IXGBE_AUTOC_KX4_KX_SUPP_MASK, ixgbe_check_link(), IXGBE_LINK_SPEED_100_FULL, IXGBE_LINK_SPEED_10GB_FULL, IXGBE_LINK_SPEED_1GB_FULL, IXGBE_LINK_SPEED_UNKNOWN, IXGBE_READ_REG, ixgbe_setup_mac_link_82599(), IXGBE_SMARTSPEED_MAX_RETRIES, IXGBE_SUCCESS, msec_delay, ixgbe_hw::phy, and ixgbe_phy_info::smart_speed_active.

Referenced by ixgbe_init_mac_link_ops_82599().

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

◆ ixgbe_setup_sfp_modules_82599()

◆ ixgbe_start_hw_82599()

s32 ixgbe_start_hw_82599 ( struct ixgbe_hw hw)

ixgbe_start_hw_82599 - 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 2128 of file ixgbe_82599.c.

References ixgbe_mac_info::autotry_restart, DEBUGFUNC, ixgbe_start_hw_gen2(), ixgbe_start_hw_generic(), IXGBE_SUCCESS, ixgbe_verify_fw_version_82599(), and ixgbe_hw::mac.

Referenced by ixgbe_init_ops_82599().

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

◆ ixgbe_start_mac_link_82599()

s32 ixgbe_start_mac_link_82599 ( struct ixgbe_hw hw,
bool  autoneg_wait_to_complete 
)

ixgbe_start_mac_link_82599 - Setup MAC link settings @hw: pointer to hardware structure @autoneg_wait_to_complete: true when waiting for completion is needed

Configures link settings based on values in the ixgbe_hw struct. Restarts the link. Performs autonegotiation if needed.

Definition at line 617 of file ixgbe_82599.c.

References ixgbe_mac_operations::acquire_swfw_sync, DEBUGFUNC, DEBUGOUT, IXGBE_AUTO_NEG_TIME, IXGBE_AUTOC, IXGBE_AUTOC_LMS_KX4_KX_KR, IXGBE_AUTOC_LMS_KX4_KX_KR_1G_AN, IXGBE_AUTOC_LMS_KX4_KX_KR_SGMII, IXGBE_AUTOC_LMS_MASK, IXGBE_ERR_AUTONEG_NOT_COMPLETE, IXGBE_GSSR_MAC_CSR_SM, IXGBE_LINKS, IXGBE_LINKS_KX_AN_COMP, IXGBE_READ_REG, ixgbe_reset_pipeline_82599(), IXGBE_SUCCESS, ixgbe_verify_lesm_fw_enabled_82599(), ixgbe_hw::mac, msec_delay, ixgbe_mac_info::ops, and ixgbe_mac_operations::release_swfw_sync.

Referenced by ixgbe_setup_copper_link_82599().

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

◆ ixgbe_write_analog_reg8_82599()

s32 ixgbe_write_analog_reg8_82599 ( struct ixgbe_hw hw,
u32  reg,
u8  val 
)

ixgbe_write_analog_reg8_82599 - Writes 8 bit Omer analog register @hw: pointer to hardware structure @reg: atlas register to write @val: value to write

Performs write operation to Omer analog register specified.

Definition at line 2106 of file ixgbe_82599.c.

References DEBUGFUNC, IXGBE_CORECTL, IXGBE_SUCCESS, IXGBE_WRITE_FLUSH, IXGBE_WRITE_REG, and usec_delay.

Referenced by ixgbe_init_ops_82599().

Here is the caller graph for this function:

◆ prot_autoc_read_82599()

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

prot_autoc_read_82599 - Hides MAC differences needed for AUTOC read @hw: pointer to hardware structure @locked: Return the if we locked for this read. @reg_val: Value we read from AUTOC

For this part (82599) we need to wrap read-modify-writes with a possible FW/SW lock. It is assumed this lock will be freed with the next prot_autoc_write_82599().

Definition at line 251 of file ixgbe_82599.c.

References ixgbe_mac_operations::acquire_swfw_sync, IXGBE_AUTOC, IXGBE_ERR_SWFW_SYNC, IXGBE_GSSR_MAC_CSR_SM, IXGBE_READ_REG, IXGBE_SUCCESS, ixgbe_verify_lesm_fw_enabled_82599(), ixgbe_hw::mac, and ixgbe_mac_info::ops.

Referenced by ixgbe_init_ops_82599().

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

◆ prot_autoc_write_82599()

s32 prot_autoc_write_82599 ( struct ixgbe_hw hw,
u32  autoc,
bool  locked 
)

prot_autoc_write_82599 - Hides MAC differences needed for AUTOC write @hw: pointer to hardware structure @autoc: value to write to AUTOC @locked: bool to indicate whether the SW/FW lock was already taken by previous proc_autoc_read_82599.

This part (82599) may need to hold the SW/FW lock around all writes to AUTOC. Likewise after a write we need to do a pipeline reset.

Definition at line 280 of file ixgbe_82599.c.

References ixgbe_mac_operations::acquire_swfw_sync, IXGBE_AUTOC, ixgbe_check_reset_blocked(), IXGBE_ERR_SWFW_SYNC, IXGBE_GSSR_MAC_CSR_SM, ixgbe_reset_pipeline_82599(), IXGBE_SUCCESS, ixgbe_verify_lesm_fw_enabled_82599(), IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_mac_info::ops, and ixgbe_mac_operations::release_swfw_sync.

Referenced by ixgbe_init_ops_82599().

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