Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
bnx2x_link.c File Reference
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/delay.h>
#include <linux/ethtool.h>
#include <linux/mutex.h>
#include "bnx2x.h"
#include "bnx2x_cmn.h"

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define ETH_HLEN   14
 
#define ETH_OVREHEAD   (ETH_HLEN + 8 + 8)
 
#define ETH_MIN_PACKET_SIZE   60
 
#define ETH_MAX_PACKET_SIZE   1500
 
#define ETH_MAX_JUMBO_PACKET_SIZE   9600
 
#define MDIO_ACCESS_TIMEOUT   1000
 
#define WC_LANE_MAX   4
 
#define I2C_SWITCH_WIDTH   2
 
#define I2C_BSC0   0
 
#define I2C_BSC1   1
 
#define I2C_WA_RETRY_CNT   3
 
#define I2C_WA_PWR_ITER   (I2C_WA_RETRY_CNT - 1)
 
#define MCPR_IMC_COMMAND_READ_OP   1
 
#define MCPR_IMC_COMMAND_WRITE_OP   2
 
#define LED_BLINK_RATE_VAL_E3   354
 
#define LED_BLINK_RATE_VAL_E1X_E2   480
 
#define NIG_LATCH_BC_ENABLE_MI_INT   0
 
#define NIG_STATUS_EMAC0_MI_INT   NIG_STATUS_INTERRUPT_PORT0_REG_STATUS_EMAC0_MISC_MI_INT
 
#define NIG_STATUS_XGXS0_LINK10G   NIG_STATUS_INTERRUPT_PORT0_REG_STATUS_XGXS0_LINK10G
 
#define NIG_STATUS_XGXS0_LINK_STATUS   NIG_STATUS_INTERRUPT_PORT0_REG_STATUS_XGXS0_LINK_STATUS
 
#define NIG_STATUS_XGXS0_LINK_STATUS_SIZE   NIG_STATUS_INTERRUPT_PORT0_REG_STATUS_XGXS0_LINK_STATUS_SIZE
 
#define NIG_STATUS_SERDES0_LINK_STATUS   NIG_STATUS_INTERRUPT_PORT0_REG_STATUS_SERDES0_LINK_STATUS
 
#define NIG_MASK_MI_INT   NIG_MASK_INTERRUPT_PORT0_REG_MASK_EMAC0_MISC_MI_INT
 
#define NIG_MASK_XGXS0_LINK10G   NIG_MASK_INTERRUPT_PORT0_REG_MASK_XGXS0_LINK10G
 
#define NIG_MASK_XGXS0_LINK_STATUS   NIG_MASK_INTERRUPT_PORT0_REG_MASK_XGXS0_LINK_STATUS
 
#define NIG_MASK_SERDES0_LINK_STATUS   NIG_MASK_INTERRUPT_PORT0_REG_MASK_SERDES0_LINK_STATUS
 
#define MDIO_AN_CL73_OR_37_COMPLETE
 
#define XGXS_RESET_BITS
 
#define SERDES_RESET_BITS
 
#define AUTONEG_CL37   SHARED_HW_CFG_AN_ENABLE_CL37
 
#define AUTONEG_CL73   SHARED_HW_CFG_AN_ENABLE_CL73
 
#define AUTONEG_BAM   SHARED_HW_CFG_AN_ENABLE_BAM
 
#define AUTONEG_PARALLEL   SHARED_HW_CFG_AN_ENABLE_PARALLEL_DETECTION
 
#define AUTONEG_SGMII_FIBER_AUTODET   SHARED_HW_CFG_AN_EN_SGMII_FIBER_AUTO_DETECT
 
#define AUTONEG_REMOTE_PHY   SHARED_HW_CFG_AN_ENABLE_REMOTE_PHY
 
#define GP_STATUS_PAUSE_RSOLUTION_TXSIDE   MDIO_GP_STATUS_TOP_AN_STATUS1_PAUSE_RSOLUTION_TXSIDE
 
#define GP_STATUS_PAUSE_RSOLUTION_RXSIDE   MDIO_GP_STATUS_TOP_AN_STATUS1_PAUSE_RSOLUTION_RXSIDE
 
#define GP_STATUS_SPEED_MASK   MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_MASK
 
#define GP_STATUS_10M   MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_10M
 
#define GP_STATUS_100M   MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_100M
 
#define GP_STATUS_1G   MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_1G
 
#define GP_STATUS_2_5G   MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_2_5G
 
#define GP_STATUS_5G   MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_5G
 
#define GP_STATUS_6G   MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_6G
 
#define GP_STATUS_10G_HIG   MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_10G_HIG
 
#define GP_STATUS_10G_CX4   MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_10G_CX4
 
#define GP_STATUS_1G_KX   MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_1G_KX
 
#define GP_STATUS_10G_KX4   MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_10G_KX4
 
#define GP_STATUS_10G_KR   MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_10G_KR
 
#define GP_STATUS_10G_XFI   MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_10G_XFI
 
#define GP_STATUS_20G_DXGXS   MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_20G_DXGXS
 
#define GP_STATUS_10G_SFI   MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_10G_SFI
 
#define LINK_10THD   LINK_STATUS_SPEED_AND_DUPLEX_10THD
 
#define LINK_10TFD   LINK_STATUS_SPEED_AND_DUPLEX_10TFD
 
#define LINK_100TXHD   LINK_STATUS_SPEED_AND_DUPLEX_100TXHD
 
#define LINK_100T4   LINK_STATUS_SPEED_AND_DUPLEX_100T4
 
#define LINK_100TXFD   LINK_STATUS_SPEED_AND_DUPLEX_100TXFD
 
#define LINK_1000THD   LINK_STATUS_SPEED_AND_DUPLEX_1000THD
 
#define LINK_1000TFD   LINK_STATUS_SPEED_AND_DUPLEX_1000TFD
 
#define LINK_1000XFD   LINK_STATUS_SPEED_AND_DUPLEX_1000XFD
 
#define LINK_2500THD   LINK_STATUS_SPEED_AND_DUPLEX_2500THD
 
#define LINK_2500TFD   LINK_STATUS_SPEED_AND_DUPLEX_2500TFD
 
#define LINK_2500XFD   LINK_STATUS_SPEED_AND_DUPLEX_2500XFD
 
#define LINK_10GTFD   LINK_STATUS_SPEED_AND_DUPLEX_10GTFD
 
#define LINK_10GXFD   LINK_STATUS_SPEED_AND_DUPLEX_10GXFD
 
#define LINK_20GTFD   LINK_STATUS_SPEED_AND_DUPLEX_20GTFD
 
#define LINK_20GXFD   LINK_STATUS_SPEED_AND_DUPLEX_20GXFD
 
#define LINK_UPDATE_MASK
 
#define SFP_EEPROM_CON_TYPE_ADDR   0x2
 
#define SFP_EEPROM_CON_TYPE_VAL_LC   0x7
 
#define SFP_EEPROM_CON_TYPE_VAL_COPPER   0x21
 
#define SFP_EEPROM_COMP_CODE_ADDR   0x3
 
#define SFP_EEPROM_COMP_CODE_SR_MASK   (1<<4)
 
#define SFP_EEPROM_COMP_CODE_LR_MASK   (1<<5)
 
#define SFP_EEPROM_COMP_CODE_LRM_MASK   (1<<6)
 
#define SFP_EEPROM_FC_TX_TECH_ADDR   0x8
 
#define SFP_EEPROM_FC_TX_TECH_BITMASK_COPPER_PASSIVE   0x4
 
#define SFP_EEPROM_FC_TX_TECH_BITMASK_COPPER_ACTIVE   0x8
 
#define SFP_EEPROM_OPTIONS_ADDR   0x40
 
#define SFP_EEPROM_OPTIONS_LINEAR_RX_OUT_MASK   0x1
 
#define SFP_EEPROM_OPTIONS_SIZE   2
 
#define EDC_MODE_LINEAR   0x0022
 
#define EDC_MODE_LIMITING   0x0044
 
#define EDC_MODE_PASSIVE_DAC   0x0055
 
#define DCBX_INVALID_COS   (0xFF)
 
#define ETS_BW_LIMIT_CREDIT_UPPER_BOUND   (0x5000)
 
#define ETS_BW_LIMIT_CREDIT_WEIGHT   (0x5000)
 
#define ETS_E3B0_NIG_MIN_W_VAL_UP_TO_10GBPS   (1360)
 
#define ETS_E3B0_NIG_MIN_W_VAL_20GBPS   (2720)
 
#define ETS_E3B0_PBF_MIN_W_VAL   (10000)
 
#define MAX_PACKET_SIZE   (9700)
 
#define MAX_KR_LINK_RETRY   4
 
#define CL22_WR_OVER_CL45(_bp, _phy, _bank, _addr, _val)
 
#define CL22_RD_OVER_CL45(_bp, _phy, _bank, _addr, _val)
 
#define PHY84833_CMDHDLR_WAIT   300
 
#define PHY84833_CMDHDLR_MAX_ARGS   5
 
#define PHY84833_CONSTANT_LATENCY   1193
 

Functions

int bnx2x_ets_disabled (struct link_params *params, struct link_vars *vars)
 
int bnx2x_ets_e3b0_config (const struct link_params *params, const struct link_vars *vars, struct bnx2x_ets_params *ets_params)
 
void bnx2x_ets_bw_limit (const struct link_params *params, const u32 cos0_bw, const u32 cos1_bw)
 
int bnx2x_ets_strict (const struct link_params *params, const u8 strict_cos)
 
void bnx2x_pfc_statistic (struct link_params *params, struct link_vars *vars, u32 pfc_frames_sent[2], u32 pfc_frames_received[2])
 
int bnx2x_update_pfc (struct link_params *params, struct link_vars *vars, struct bnx2x_nig_brb_pfc_port_params *pfc_params)
 
int bnx2x_phy_read (struct link_params *params, u8 phy_addr, u8 devad, u16 reg, u16 *ret_val)
 
int bnx2x_phy_write (struct link_params *params, u8 phy_addr, u8 devad, u16 reg, u16 val)
 
void bnx2x_link_status_update (struct link_params *params, struct link_vars *vars)
 
int bnx2x_get_ext_phy_fw_version (struct link_params *params, u8 *version, u16 len)
 
int bnx2x_set_led (struct link_params *params, struct link_vars *vars, u8 mode, u32 speed)
 
int bnx2x_test_link (struct link_params *params, struct link_vars *vars, u8 is_serdes)
 
int bnx2x_link_update (struct link_params *params, struct link_vars *vars)
 
void bnx2x_ext_phy_hw_reset (struct bnx2x *bp, u8 port)
 
int bnx2x_read_sfp_module_eeprom (struct bnx2x_phy *phy, struct link_params *params, u16 addr, u8 byte_cnt, u8 *o_buf)
 
int bnx2x_sfp_module_detection (struct bnx2x_phy *phy, struct link_params *params)
 
void bnx2x_handle_module_detect_int (struct link_params *params)
 
void bnx2x_sfx7101_sp_sw_reset (struct bnx2x *bp, struct bnx2x_phy *phy)
 
u32 bnx2x_phy_selection (struct link_params *params)
 
int bnx2x_phy_probe (struct link_params *params)
 
void bnx2x_init_bmac_loopback (struct link_params *params, struct link_vars *vars)
 
void bnx2x_init_emac_loopback (struct link_params *params, struct link_vars *vars)
 
void bnx2x_init_xmac_loopback (struct link_params *params, struct link_vars *vars)
 
void bnx2x_init_umac_loopback (struct link_params *params, struct link_vars *vars)
 
void bnx2x_init_xgxs_loopback (struct link_params *params, struct link_vars *vars)
 
int bnx2x_phy_init (struct link_params *params, struct link_vars *vars)
 
int bnx2x_link_reset (struct link_params *params, struct link_vars *vars, u8 reset_ext_phy)
 
int bnx2x_lfa_reset (struct link_params *params, struct link_vars *vars)
 
int bnx2x_pre_init_phy (struct bnx2x *bp, u32 shmem_base, u32 shmem2_base, u32 chip_id)
 
int bnx2x_common_init_phy (struct bnx2x *bp, u32 shmem_base_path[], u32 shmem2_base_path[], u32 chip_id)
 
int bnx2x_check_half_open_conn (struct link_params *params, struct link_vars *vars, u8 notify)
 
void bnx2x_period_func (struct link_params *params, struct link_vars *vars)
 
u8 bnx2x_hw_lock_required (struct bnx2x *bp, u32 shmem_base, u32 shmem2_base)
 
u8 bnx2x_fan_failure_det_req (struct bnx2x *bp, u32 shmem_base, u32 shmem2_base, u8 port)
 
void bnx2x_hw_reset_phy (struct link_params *params)
 
void bnx2x_init_mod_abs_int (struct bnx2x *bp, struct link_vars *vars, u32 chip_id, u32 shmem_base, u32 shmem2_base, u8 port)
 

Macro Definition Documentation

#define AUTONEG_BAM   SHARED_HW_CFG_AN_ENABLE_BAM

Definition at line 94 of file bnx2x_link.c.

#define AUTONEG_CL37   SHARED_HW_CFG_AN_ENABLE_CL37

Definition at line 92 of file bnx2x_link.c.

#define AUTONEG_CL73   SHARED_HW_CFG_AN_ENABLE_CL73

Definition at line 93 of file bnx2x_link.c.

#define AUTONEG_PARALLEL   SHARED_HW_CFG_AN_ENABLE_PARALLEL_DETECTION

Definition at line 95 of file bnx2x_link.c.

#define AUTONEG_REMOTE_PHY   SHARED_HW_CFG_AN_ENABLE_REMOTE_PHY

Definition at line 99 of file bnx2x_link.c.

#define AUTONEG_SGMII_FIBER_AUTODET   SHARED_HW_CFG_AN_EN_SGMII_FIBER_AUTO_DETECT

Definition at line 97 of file bnx2x_link.c.

#define CL22_RD_OVER_CL45 (   _bp,
  _phy,
  _bank,
  _addr,
  _val 
)
Value:
bnx2x_cl45_read(_bp, _phy, \
(_phy)->def_md_devad, \
(_bank + (_addr & 0xf)), \
_val)

Definition at line 195 of file bnx2x_link.c.

#define CL22_WR_OVER_CL45 (   _bp,
  _phy,
  _bank,
  _addr,
  _val 
)
Value:
bnx2x_cl45_write(_bp, _phy, \
(_phy)->def_md_devad, \
(_bank + (_addr & 0xf)), \
_val)

Definition at line 189 of file bnx2x_link.c.

#define DCBX_INVALID_COS   (0xFF)

Definition at line 174 of file bnx2x_link.c.

#define EDC_MODE_LIMITING   0x0044

Definition at line 170 of file bnx2x_link.c.

#define EDC_MODE_LINEAR   0x0022

Definition at line 169 of file bnx2x_link.c.

#define EDC_MODE_PASSIVE_DAC   0x0055

Definition at line 171 of file bnx2x_link.c.

#define ETH_HLEN   14

Definition at line 31 of file bnx2x_link.c.

#define ETH_MAX_JUMBO_PACKET_SIZE   9600

Definition at line 36 of file bnx2x_link.c.

#define ETH_MAX_PACKET_SIZE   1500

Definition at line 35 of file bnx2x_link.c.

#define ETH_MIN_PACKET_SIZE   60

Definition at line 34 of file bnx2x_link.c.

#define ETH_OVREHEAD   (ETH_HLEN + 8 + 8)

Definition at line 33 of file bnx2x_link.c.

#define ETS_BW_LIMIT_CREDIT_UPPER_BOUND   (0x5000)

Definition at line 176 of file bnx2x_link.c.

#define ETS_BW_LIMIT_CREDIT_WEIGHT   (0x5000)

Definition at line 177 of file bnx2x_link.c.

#define ETS_E3B0_NIG_MIN_W_VAL_20GBPS   (2720)

Definition at line 179 of file bnx2x_link.c.

#define ETS_E3B0_NIG_MIN_W_VAL_UP_TO_10GBPS   (1360)

Definition at line 178 of file bnx2x_link.c.

#define ETS_E3B0_PBF_MIN_W_VAL   (10000)

Definition at line 180 of file bnx2x_link.c.

Definition at line 108 of file bnx2x_link.c.

Definition at line 115 of file bnx2x_link.c.

Definition at line 113 of file bnx2x_link.c.

Definition at line 120 of file bnx2x_link.c.

Definition at line 118 of file bnx2x_link.c.

Definition at line 123 of file bnx2x_link.c.

Definition at line 121 of file bnx2x_link.c.

Definition at line 107 of file bnx2x_link.c.

Definition at line 109 of file bnx2x_link.c.

Definition at line 117 of file bnx2x_link.c.

#define GP_STATUS_20G_DXGXS   MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_20G_DXGXS

Definition at line 122 of file bnx2x_link.c.

Definition at line 110 of file bnx2x_link.c.

Definition at line 111 of file bnx2x_link.c.

Definition at line 112 of file bnx2x_link.c.

#define GP_STATUS_PAUSE_RSOLUTION_RXSIDE   MDIO_GP_STATUS_TOP_AN_STATUS1_PAUSE_RSOLUTION_RXSIDE

Definition at line 103 of file bnx2x_link.c.

#define GP_STATUS_PAUSE_RSOLUTION_TXSIDE   MDIO_GP_STATUS_TOP_AN_STATUS1_PAUSE_RSOLUTION_TXSIDE

Definition at line 101 of file bnx2x_link.c.

#define GP_STATUS_SPEED_MASK   MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_MASK

Definition at line 105 of file bnx2x_link.c.

#define I2C_BSC0   0

Definition at line 40 of file bnx2x_link.c.

#define I2C_BSC1   1

Definition at line 41 of file bnx2x_link.c.

#define I2C_SWITCH_WIDTH   2

Definition at line 39 of file bnx2x_link.c.

#define I2C_WA_PWR_ITER   (I2C_WA_RETRY_CNT - 1)

Definition at line 43 of file bnx2x_link.c.

#define I2C_WA_RETRY_CNT   3

Definition at line 42 of file bnx2x_link.c.

#define LED_BLINK_RATE_VAL_E1X_E2   480

Definition at line 49 of file bnx2x_link.c.

#define LED_BLINK_RATE_VAL_E3   354

Definition at line 48 of file bnx2x_link.c.

#define LINK_1000TFD   LINK_STATUS_SPEED_AND_DUPLEX_1000TFD

Definition at line 130 of file bnx2x_link.c.

#define LINK_1000THD   LINK_STATUS_SPEED_AND_DUPLEX_1000THD

Definition at line 129 of file bnx2x_link.c.

#define LINK_1000XFD   LINK_STATUS_SPEED_AND_DUPLEX_1000XFD

Definition at line 131 of file bnx2x_link.c.

#define LINK_100T4   LINK_STATUS_SPEED_AND_DUPLEX_100T4

Definition at line 127 of file bnx2x_link.c.

#define LINK_100TXFD   LINK_STATUS_SPEED_AND_DUPLEX_100TXFD

Definition at line 128 of file bnx2x_link.c.

#define LINK_100TXHD   LINK_STATUS_SPEED_AND_DUPLEX_100TXHD

Definition at line 126 of file bnx2x_link.c.

#define LINK_10GTFD   LINK_STATUS_SPEED_AND_DUPLEX_10GTFD

Definition at line 135 of file bnx2x_link.c.

#define LINK_10GXFD   LINK_STATUS_SPEED_AND_DUPLEX_10GXFD

Definition at line 136 of file bnx2x_link.c.

#define LINK_10TFD   LINK_STATUS_SPEED_AND_DUPLEX_10TFD

Definition at line 125 of file bnx2x_link.c.

#define LINK_10THD   LINK_STATUS_SPEED_AND_DUPLEX_10THD

Definition at line 124 of file bnx2x_link.c.

#define LINK_20GTFD   LINK_STATUS_SPEED_AND_DUPLEX_20GTFD

Definition at line 137 of file bnx2x_link.c.

#define LINK_20GXFD   LINK_STATUS_SPEED_AND_DUPLEX_20GXFD

Definition at line 138 of file bnx2x_link.c.

#define LINK_2500TFD   LINK_STATUS_SPEED_AND_DUPLEX_2500TFD

Definition at line 133 of file bnx2x_link.c.

#define LINK_2500THD   LINK_STATUS_SPEED_AND_DUPLEX_2500THD

Definition at line 132 of file bnx2x_link.c.

#define LINK_2500XFD   LINK_STATUS_SPEED_AND_DUPLEX_2500XFD

Definition at line 134 of file bnx2x_link.c.

#define LINK_UPDATE_MASK
Value:
LINK_STATUS_LINK_UP | \
LINK_STATUS_PHYSICAL_LINK_FLAG | \
LINK_STATUS_AUTO_NEGOTIATE_COMPLETE | \
LINK_STATUS_RX_FLOW_CONTROL_FLAG_MASK | \
LINK_STATUS_TX_FLOW_CONTROL_FLAG_MASK | \
LINK_STATUS_PARALLEL_DETECTION_FLAG_MASK | \
LINK_STATUS_LINK_PARTNER_SYMMETRIC_PAUSE | \
LINK_STATUS_LINK_PARTNER_ASYMMETRIC_PAUSE)

Definition at line 140 of file bnx2x_link.c.

#define MAX_KR_LINK_RETRY   4

Definition at line 183 of file bnx2x_link.c.

#define MAX_PACKET_SIZE   (9700)

Definition at line 182 of file bnx2x_link.c.

#define MCPR_IMC_COMMAND_READ_OP   1

Definition at line 44 of file bnx2x_link.c.

#define MCPR_IMC_COMMAND_WRITE_OP   2

Definition at line 45 of file bnx2x_link.c.

#define MDIO_ACCESS_TIMEOUT   1000

Definition at line 37 of file bnx2x_link.c.

#define MDIO_AN_CL73_OR_37_COMPLETE
Value:
MDIO_GP_STATUS_TOP_AN_STATUS1_CL37_AUTONEG_COMPLETE)

Definition at line 75 of file bnx2x_link.c.

#define NIG_LATCH_BC_ENABLE_MI_INT   0

Definition at line 54 of file bnx2x_link.c.

Definition at line 66 of file bnx2x_link.c.

#define NIG_MASK_SERDES0_LINK_STATUS   NIG_MASK_INTERRUPT_PORT0_REG_MASK_SERDES0_LINK_STATUS

Definition at line 72 of file bnx2x_link.c.

#define NIG_MASK_XGXS0_LINK10G   NIG_MASK_INTERRUPT_PORT0_REG_MASK_XGXS0_LINK10G

Definition at line 68 of file bnx2x_link.c.

#define NIG_MASK_XGXS0_LINK_STATUS   NIG_MASK_INTERRUPT_PORT0_REG_MASK_XGXS0_LINK_STATUS

Definition at line 70 of file bnx2x_link.c.

#define NIG_STATUS_EMAC0_MI_INT   NIG_STATUS_INTERRUPT_PORT0_REG_STATUS_EMAC0_MISC_MI_INT

Definition at line 56 of file bnx2x_link.c.

#define NIG_STATUS_SERDES0_LINK_STATUS   NIG_STATUS_INTERRUPT_PORT0_REG_STATUS_SERDES0_LINK_STATUS

Definition at line 64 of file bnx2x_link.c.

#define NIG_STATUS_XGXS0_LINK10G   NIG_STATUS_INTERRUPT_PORT0_REG_STATUS_XGXS0_LINK10G

Definition at line 58 of file bnx2x_link.c.

#define NIG_STATUS_XGXS0_LINK_STATUS   NIG_STATUS_INTERRUPT_PORT0_REG_STATUS_XGXS0_LINK_STATUS

Definition at line 60 of file bnx2x_link.c.

#define NIG_STATUS_XGXS0_LINK_STATUS_SIZE   NIG_STATUS_INTERRUPT_PORT0_REG_STATUS_XGXS0_LINK_STATUS_SIZE

Definition at line 62 of file bnx2x_link.c.

#define PHY84833_CMDHDLR_MAX_ARGS   5

Definition at line 9599 of file bnx2x_link.c.

#define PHY84833_CMDHDLR_WAIT   300

Definition at line 9598 of file bnx2x_link.c.

#define PHY84833_CONSTANT_LATENCY   1193

Definition at line 9797 of file bnx2x_link.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 17 of file bnx2x_link.c.

#define SERDES_RESET_BITS
Value:
MISC_REGISTERS_RESET_REG_3_MISC_NIG_MUX_SERDES0_IDDQ | \
MISC_REGISTERS_RESET_REG_3_MISC_NIG_MUX_SERDES0_PWRDWN | \
MISC_REGISTERS_RESET_REG_3_MISC_NIG_MUX_SERDES0_PWRDWN_SD)

Definition at line 86 of file bnx2x_link.c.

#define SFP_EEPROM_COMP_CODE_ADDR   0x3

Definition at line 156 of file bnx2x_link.c.

#define SFP_EEPROM_COMP_CODE_LR_MASK   (1<<5)

Definition at line 158 of file bnx2x_link.c.

#define SFP_EEPROM_COMP_CODE_LRM_MASK   (1<<6)

Definition at line 159 of file bnx2x_link.c.

#define SFP_EEPROM_COMP_CODE_SR_MASK   (1<<4)

Definition at line 157 of file bnx2x_link.c.

#define SFP_EEPROM_CON_TYPE_ADDR   0x2

Definition at line 151 of file bnx2x_link.c.

#define SFP_EEPROM_CON_TYPE_VAL_COPPER   0x21

Definition at line 153 of file bnx2x_link.c.

#define SFP_EEPROM_CON_TYPE_VAL_LC   0x7

Definition at line 152 of file bnx2x_link.c.

#define SFP_EEPROM_FC_TX_TECH_ADDR   0x8

Definition at line 161 of file bnx2x_link.c.

#define SFP_EEPROM_FC_TX_TECH_BITMASK_COPPER_ACTIVE   0x8

Definition at line 163 of file bnx2x_link.c.

#define SFP_EEPROM_FC_TX_TECH_BITMASK_COPPER_PASSIVE   0x4

Definition at line 162 of file bnx2x_link.c.

#define SFP_EEPROM_OPTIONS_ADDR   0x40

Definition at line 165 of file bnx2x_link.c.

#define SFP_EEPROM_OPTIONS_LINEAR_RX_OUT_MASK   0x1

Definition at line 166 of file bnx2x_link.c.

#define SFP_EEPROM_OPTIONS_SIZE   2

Definition at line 167 of file bnx2x_link.c.

#define WC_LANE_MAX   4

Definition at line 38 of file bnx2x_link.c.

#define XGXS_RESET_BITS
Value:
MISC_REGISTERS_RESET_REG_3_MISC_NIG_MUX_XGXS0_IDDQ | \
MISC_REGISTERS_RESET_REG_3_MISC_NIG_MUX_XGXS0_PWRDWN | \
MISC_REGISTERS_RESET_REG_3_MISC_NIG_MUX_XGXS0_PWRDWN_SD | \
MISC_REGISTERS_RESET_REG_3_MISC_NIG_MUX_XGXS0_TXD_FIFO_RSTB)

Definition at line 79 of file bnx2x_link.c.

Function Documentation

int bnx2x_check_half_open_conn ( struct link_params params,
struct link_vars vars,
u8  notify 
)

Definition at line 13044 of file bnx2x_link.c.

int bnx2x_common_init_phy ( struct bnx2x bp,
u32  shmem_base_path[],
u32  shmem2_base_path[],
u32  chip_id 
)

Definition at line 12894 of file bnx2x_link.c.

void bnx2x_ets_bw_limit ( const struct link_params params,
const u32  cos0_bw,
const u32  cos1_bw 
)

Definition at line 1253 of file bnx2x_link.c.

int bnx2x_ets_disabled ( struct link_params params,
struct link_vars vars 
)

Definition at line 742 of file bnx2x_link.c.

int bnx2x_ets_e3b0_config ( const struct link_params params,
const struct link_vars vars,
struct bnx2x_ets_params ets_params 
)

Definition at line 1107 of file bnx2x_link.c.

int bnx2x_ets_strict ( const struct link_params params,
const u8  strict_cos 
)

Definition at line 1285 of file bnx2x_link.c.

void bnx2x_ext_phy_hw_reset ( struct bnx2x bp,
u8  port 
)

Definition at line 6752 of file bnx2x_link.c.

u8 bnx2x_fan_failure_det_req ( struct bnx2x bp,
u32  shmem_base,
u32  shmem2_base,
u8  port 
)

Definition at line 13202 of file bnx2x_link.c.

int bnx2x_get_ext_phy_fw_version ( struct link_params params,
u8 version,
u16  len 
)

Definition at line 5927 of file bnx2x_link.c.

void bnx2x_handle_module_detect_int ( struct link_params params)

Definition at line 8386 of file bnx2x_link.c.

u8 bnx2x_hw_lock_required ( struct bnx2x bp,
u32  shmem_base,
u32  shmem2_base 
)

Definition at line 13184 of file bnx2x_link.c.

void bnx2x_hw_reset_phy ( struct link_params params)

Definition at line 13223 of file bnx2x_link.c.

void bnx2x_init_bmac_loopback ( struct link_params params,
struct link_vars vars 
)

Definition at line 11937 of file bnx2x_link.c.

void bnx2x_init_emac_loopback ( struct link_params params,
struct link_vars vars 
)

Definition at line 11957 of file bnx2x_link.c.

void bnx2x_init_mod_abs_int ( struct bnx2x bp,
struct link_vars vars,
u32  chip_id,
u32  shmem_base,
u32  shmem2_base,
u8  port 
)

Definition at line 13245 of file bnx2x_link.c.

void bnx2x_init_umac_loopback ( struct link_params params,
struct link_vars vars 
)

Definition at line 12002 of file bnx2x_link.c.

void bnx2x_init_xgxs_loopback ( struct link_params params,
struct link_vars vars 
)

Definition at line 12017 of file bnx2x_link.c.

void bnx2x_init_xmac_loopback ( struct link_params params,
struct link_vars vars 
)

Definition at line 11976 of file bnx2x_link.c.

int bnx2x_lfa_reset ( struct link_params params,
struct link_vars vars 
)

Definition at line 12396 of file bnx2x_link.c.

int bnx2x_link_reset ( struct link_params params,
struct link_vars vars,
u8  reset_ext_phy 
)

Definition at line 12306 of file bnx2x_link.c.

void bnx2x_link_status_update ( struct link_params params,
struct link_vars vars 
)

Definition at line 4555 of file bnx2x_link.c.

int bnx2x_link_update ( struct link_params params,
struct link_vars vars 
)

Definition at line 6497 of file bnx2x_link.c.

void bnx2x_period_func ( struct link_params params,
struct link_vars vars 
)

Definition at line 13142 of file bnx2x_link.c.

void bnx2x_pfc_statistic ( struct link_params params,
struct link_vars vars,
u32  pfc_frames_sent[2],
u32  pfc_frames_received[2] 
)

Definition at line 1422 of file bnx2x_link.c.

int bnx2x_phy_init ( struct link_params params,
struct link_vars vars 
)

Definition at line 12221 of file bnx2x_link.c.

int bnx2x_phy_probe ( struct link_params params)

Definition at line 11867 of file bnx2x_link.c.

int bnx2x_phy_read ( struct link_params params,
u8  phy_addr,
u8  devad,
u16  reg,
u16 ret_val 
)

Definition at line 3150 of file bnx2x_link.c.

u32 bnx2x_phy_selection ( struct link_params params)

Definition at line 11834 of file bnx2x_link.c.

int bnx2x_phy_write ( struct link_params params,
u8  phy_addr,
u8  devad,
u16  reg,
u16  val 
)

Definition at line 3167 of file bnx2x_link.c.

int bnx2x_pre_init_phy ( struct bnx2x bp,
u32  shmem_base,
u32  shmem2_base,
u32  chip_id 
)

Definition at line 12818 of file bnx2x_link.c.

int bnx2x_read_sfp_module_eeprom ( struct bnx2x_phy phy,
struct link_params params,
u16  addr,
u8  byte_cnt,
u8 o_buf 
)

Definition at line 7760 of file bnx2x_link.c.

int bnx2x_set_led ( struct link_params params,
struct link_vars vars,
u8  mode,
u32  speed 
)

Definition at line 6022 of file bnx2x_link.c.

int bnx2x_sfp_module_detection ( struct bnx2x_phy phy,
struct link_params params 
)

Definition at line 8330 of file bnx2x_link.c.

void bnx2x_sfx7101_sp_sw_reset ( struct bnx2x bp,
struct bnx2x_phy phy 
)

Definition at line 10903 of file bnx2x_link.c.

int bnx2x_test_link ( struct link_params params,
struct link_vars vars,
u8  is_serdes 
)

Definition at line 6164 of file bnx2x_link.c.

int bnx2x_update_pfc ( struct link_params params,
struct link_vars vars,
struct bnx2x_nig_brb_pfc_port_params pfc_params 
)

Definition at line 2195 of file bnx2x_link.c.