Linux Kernel
3.7.1
|
#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.
#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 | |||
) |
Definition at line 195 of file bnx2x_link.c.
#define CL22_WR_OVER_CL45 | ( | _bp, | |
_phy, | |||
_bank, | |||
_addr, | |||
_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.
#define GP_STATUS_100M MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_100M |
Definition at line 108 of file bnx2x_link.c.
#define GP_STATUS_10G_CX4 MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_10G_CX4 |
Definition at line 115 of file bnx2x_link.c.
#define GP_STATUS_10G_HIG MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_10G_HIG |
Definition at line 113 of file bnx2x_link.c.
#define GP_STATUS_10G_KR MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_10G_KR |
Definition at line 120 of file bnx2x_link.c.
#define GP_STATUS_10G_KX4 MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_10G_KX4 |
Definition at line 118 of file bnx2x_link.c.
#define GP_STATUS_10G_SFI MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_10G_SFI |
Definition at line 123 of file bnx2x_link.c.
#define GP_STATUS_10G_XFI MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_10G_XFI |
Definition at line 121 of file bnx2x_link.c.
#define GP_STATUS_10M MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_10M |
Definition at line 107 of file bnx2x_link.c.
#define GP_STATUS_1G MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_1G |
Definition at line 109 of file bnx2x_link.c.
#define GP_STATUS_1G_KX MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_1G_KX |
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.
#define GP_STATUS_2_5G MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_2_5G |
Definition at line 110 of file bnx2x_link.c.
#define GP_STATUS_5G MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_5G |
Definition at line 111 of file bnx2x_link.c.
#define GP_STATUS_6G MDIO_GP_STATUS_TOP_AN_STATUS1_ACTUAL_SPEED_6G |
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 |
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 |
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.
#define NIG_MASK_MI_INT NIG_MASK_INTERRUPT_PORT0_REG_MASK_EMAC0_MISC_MI_INT |
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.
Definition at line 17 of file bnx2x_link.c.
#define SERDES_RESET_BITS |
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 |
Definition at line 79 of file bnx2x_link.c.
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.
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.
Definition at line 1285 of file bnx2x_link.c.
Definition at line 6752 of file bnx2x_link.c.
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.
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.
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.
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.
Definition at line 3167 of file bnx2x_link.c.
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.
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.
Definition at line 10903 of file bnx2x_link.c.
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.