52 {0x00000000, 0x40830380, 0x009f0081, 0xa184a053, 0xaf000400,
57 {0x08000002, 0x4b808201, 0x00050081, 0x03840253, 0xaf020406,
63 {0x04000001, 0x47808201, 0x00050081, 0x03840253, 0xaf020406,
66 "Non-buffered flash (128kB)"},
69 {0x0c000003, 0x4f808201, 0x00050081, 0x03840253, 0xaf020406,
72 "Non-buffered flash (256kB)"},
74 {0x11000000, 0x53808201, 0x00050081, 0x03840253, 0xaf020406,
79 {0x19000002, 0x5b808201, 0x000500db, 0x03840253, 0xaf020406,
82 "Entry 0101: ST M45PE10 (128kB non-bufferred)"},
84 {0x15000001, 0x57808201, 0x000500db, 0x03840253, 0xaf020406,
87 "Entry 0110: ST M45PE20 (256kB non-bufferred)"},
90 {0x1d000003, 0x5f808201, 0x00050081, 0x03840253, 0xaf020406,
93 "Non-buffered flash (64kB)"},
95 {0x22000000, 0x62808380, 0x009f0081, 0xa184a053, 0xaf000400,
100 {0x2a000002, 0x6b808201, 0x00050081, 0x03840253, 0xaf020406,
105 {0x26000001, 0x67808201, 0x00050081, 0x03840253, 0xaf020406,
110 {0x2e000003, 0x6e808273, 0x00570081, 0x68848353, 0xaf000400,
113 "Buffered flash (128kB)"},
115 {0x33000000, 0x73808201, 0x00050081, 0x03840253, 0xaf020406,
120 {0x3b000002, 0x7b808201, 0x00050081, 0x03840253, 0xaf020406,
125 {0x37000001, 0x76808273, 0x00570081, 0x68848353, 0xaf000400,
128 "Entry 1110 (Atmel)"},
130 {0x3f000003, 0x7e808273, 0x00570081, 0x68848353, 0xaf000400,
133 "Buffered flash (256kB)"},
174 val1 = (
bp->phy_addr << 21) | (
reg << 16) |
179 for (i = 0; i < 50; i++) {
231 val1 = (
bp->phy_addr << 21) | (
reg << 16) |
val |
236 for (i = 0; i < 50; i++) {
297 u32 fw_link_status = 0;
302 switch (
bp->line_speed) {
354 printf(
"NIC Link is Up, ");
372 printf(
"flow control ON");
377 printf(
"NIC Link is Down\n");
386 u32 local_adv, remote_adv;
393 bp->flow_ctrl =
bp->req_flow_ctrl;
418 u32 new_local_adv = 0;
419 u32 new_remote_adv = 0;
430 local_adv = new_local_adv;
431 remote_adv = new_remote_adv;
511 common = local_adv & remote_adv;
537 common = local_adv & (remote_adv >> 2);
550 common = local_adv & remote_adv;
610 switch (
bp->line_speed) {
669 link_up =
bp->link_up;
715 if (
bp->link_up != link_up) {
732 #define PHY_RESET_MAX_WAIT 100 790 int force_link_down = 0;
815 if ((new_bmcr != bmcr) || (force_link_down)) {
847 bp->serdes_an_pending = 0;
854 for (i = 0; i < 110; i++) {
873 bp->serdes_an_pending = 1;
874 mod_timer(&
bp->timer, jiffies +
bp->current_interval);
882 #define ETHTOOL_ALL_FIBRE_SPEED \ 883 (ADVERTISED_1000baseT_Full) 885 #define ETHTOOL_ALL_COPPER_SPEED \ 886 (ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | \ 887 ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full | \ 888 ADVERTISED_1000baseT_Full) 890 #define PHY_ALL_10_100_SPEED (ADVERTISE_10HALF | ADVERTISE_10FULL | \ 891 ADVERTISE_100HALF | ADVERTISE_100FULL | ADVERTISE_CSMA) 893 #define PHY_ALL_1000_SPEED (ADVERTISE_1000HALF | ADVERTISE_1000FULL) 904 u32 adv_reg, adv1000_reg;
906 u32 new_adv1000_reg = 0;
930 if ((adv1000_reg != new_adv1000_reg) ||
931 (adv_reg != new_adv_reg) ||
939 else if (
bp->link_up) {
956 if (new_bmcr != bmcr) {
981 bp->line_speed =
bp->req_line_speed;
982 bp->duplex =
bp->req_duplex;
1127 bp->phy_id =
val << 16;
1129 bp->phy_id |=
val & 0xffff;
1153 msg_data |=
bp->fw_wr_seq;
1172 printf(
"fw sync timeout, reset code = %x\n", (
unsigned int) msg_data);
1204 new_vcid = 0x60 + (vcid & 0xf0) + (vcid & 0x7);
1213 pcid_addr = vcid_addr;
1251 if (!(
val & (1 << 9))) {
1252 good_mbuf[good_mbuf_cnt] = (
u16)
val;
1261 while (good_mbuf_cnt) {
1264 val = good_mbuf[good_mbuf_cnt];
1276 u8 *mac_addr =
bp->nic->node_addr;
1278 val = (mac_addr[0] << 8) | mac_addr[1];
1282 val = (mac_addr[2] << 24) | (mac_addr[3] << 16) |
1283 (mac_addr[4] << 8) | mac_addr[5];
1327 for (i = 0; i < rv2p_code_len; i += 8) {
1682 int j, entry_count,
rc;
1691 if (
val & 0x40000000) {
1706 if (
val & (1 << 23))
1714 if ((
val & mask) == (
flash->strapping & mask)) {
1734 if (j == entry_count) {
1736 printf(
"Unknown flash/EEPROM type.\n");
1743 bp->flash_size =
val;
1746 bp->flash_size =
bp->flash_info->total_size;
1793 for (i = 0; i < 10; i++) {
1804 printf(
"Chip reset did not complete\n");
1810 if (
val != 0x01020304) {
1811 printf(
"Chip not in correct endian mode\n");
1855 #if __BYTE_ORDER == __BIG_ENDIAN 1862 val |= (0x2 << 20) | (1 << 11);
1920 val =
bp->mac_addr[0] +
1921 (
bp->mac_addr[1] << 8) +
1922 (
bp->mac_addr[2] << 16) +
1924 (
bp->mac_addr[4] << 8) +
1925 (
bp->mac_addr[5] << 16);
1934 bp->last_status_idx = 0;
1941 (
u64)
bp->status_blk_mapping & 0xffffffff);
1945 (
u64)
bp->stats_blk_mapping & 0xffffffff);
1947 (
u64)
bp->stats_blk_mapping >> 32);
1950 (
bp->tx_quick_cons_trip_int << 16) |
bp->tx_quick_cons_trip);
1953 (
bp->rx_quick_cons_trip_int << 16) |
bp->rx_quick_cons_trip);
1956 (
bp->comp_prod_trip_int << 16) |
bp->comp_prod_trip);
1963 (
bp->com_ticks_int << 16) |
bp->com_ticks);
1966 (
bp->cmd_ticks_int << 16) |
bp->cmd_ticks);
2019 bp->tx_prod_bseq = 0;
2032 val = (
u64)
bp->tx_desc_mapping & 0xffffffff;
2041 u16 prod, ring_prod;
2047 ring_prod = prod =
bp->rx_prod = 0;
2050 bp->rx_prod_bseq = 0;
2054 rxbd = &
bp->rx_desc_ring[0];
2070 val =
bp->rx_desc_mapping & 0xffffffff;
2073 for (i = 0; (int) i < bp->rx_ring_size; i++) {
2077 bp->rx_prod_bseq +=
bp->rx_buf_use_size;
2120 unsigned long bnx2reg_base, bnx2reg_len;
2136 if (
bp->pm_cap == 0) {
2137 printf(
"Cannot find power management capability, aborting.\n");
2139 goto err_out_disable;
2143 if (
bp->pcix_cap == 0) {
2144 printf(
"Cannot find PCIX capability, aborting.\n");
2146 goto err_out_disable;
2158 printf(
"Cannot map register space, aborting.\n");
2160 goto err_out_disable;
2187 bp->bus_speed_mhz = 133;
2191 bp->bus_speed_mhz = 100;
2196 bp->bus_speed_mhz = 66;
2201 bp->bus_speed_mhz = 50;
2207 bp->bus_speed_mhz = 33;
2213 bp->bus_speed_mhz = 66;
2215 bp->bus_speed_mhz = 33;
2230 printf(
"5706 A1 can only be used in a PCIX bus, aborting.\n");
2231 goto err_out_disable;
2251 printf(
"Firmware not running, aborting.\n");
2253 goto err_out_disable;
2259 bp->mac_addr[0] = (
u8) (
reg >> 8);
2263 bp->mac_addr[2] = (
u8) (
reg >> 24);
2264 bp->mac_addr[3] = (
u8) (
reg >> 16);
2265 bp->mac_addr[4] = (
u8) (
reg >> 8);
2274 bp->tx_quick_cons_trip_int = 20;
2275 bp->tx_quick_cons_trip = 20;
2276 bp->tx_ticks_int = 80;
2279 bp->rx_quick_cons_trip_int = 6;
2280 bp->rx_quick_cons_trip = 6;
2281 bp->rx_ticks_int = 18;
2284 bp->stats_ticks = 1000000 & 0xffff00;
2304 bp->tx_quick_cons_trip_int =
2305 bp->tx_quick_cons_trip;
2306 bp->tx_ticks_int =
bp->tx_ticks;
2307 bp->rx_quick_cons_trip_int =
2308 bp->rx_quick_cons_trip;
2309 bp->rx_ticks_int =
bp->rx_ticks;
2310 bp->comp_prod_trip_int =
bp->comp_prod_trip;
2311 bp->com_ticks_int =
bp->com_ticks;
2312 bp->cmd_ticks_int =
bp->cmd_ticks;
2316 bp->req_line_speed = 0;
2349 unsigned int type,
unsigned int size,
const char *packet)
2360 static int frame_idx = 0;
2365 u16 prod, ring_prod;
2371 hw_cons =
bp->status_blk->status_tx_quick_consumer_index0;
2376 while((hw_cons != prod) && (hw_cons != (
PREV_TX_BD(prod)))) {
2380 printf(
"transmit timed out\n");
2398 txbd = &
bp->tx_desc_ring[ring_prod];
2421 u32 new_link_state, old_link_state, emac_status;
2423 new_link_state =
bp->status_blk->status_attn_bits &
2426 old_link_state =
bp->status_blk->status_attn_bits_ack &
2429 if (!new_link_state && !old_link_state) {
2443 new_link_state =
bp->status_blk->status_attn_bits &
2446 old_link_state =
bp->status_blk->status_attn_bits_ack &
2454 if (!new_link_state && !old_link_state) {
2460 new_link_state = !old_link_state;
2466 if (new_link_state != old_link_state) {
2467 if (new_link_state) {
2495 struct rx_bd *cons_bd, *prod_bd;
2496 u16 hw_cons, sw_cons, sw_ring_cons, sw_prod, sw_ring_prod;
2500 unsigned char *
data;
2504 if ((
bp->status_blk->status_idx ==
bp->last_status_idx) &&
2508 bp->last_status_idx =
bp->status_blk->status_idx;
2512 bp->last_status_idx);
2517 if ((
bp->status_blk->status_rx_quick_consumer_index0 !=
bp->rx_cons) && !retrieve)
2520 if (
bp->status_blk->status_rx_quick_consumer_index0 !=
bp->rx_cons) {
2522 hw_cons =
bp->hw_rx_cons =
bp->status_blk->status_rx_quick_consumer_index0;
2526 sw_cons =
bp->rx_cons;
2527 sw_prod =
bp->rx_prod;
2530 if (sw_cons != hw_cons) {
2556 bp->rx_prod_bseq +=
bp->rx_buf_use_size;
2557 if (sw_cons != sw_prod) {
2558 cons_bd = &
bp->rx_desc_ring[sw_ring_cons];
2559 prod_bd = &
bp->rx_desc_ring[sw_ring_prod];
2569 bp->rx_cons = sw_cons;
2570 bp->rx_prod = sw_prod;
2583 bp->last_status_idx =
bp->status_blk->status_idx;
2589 bp->last_status_idx);
2638 printf(
"Broadcom NetXtreme II (%c%d) PCI%s %s %dMHz\n",
2639 (
int) ((
CHIP_ID(
bp) & 0xf000) >> 12) +
'A',
2662 printf(
"Valid link not established\n");
2663 goto err_out_disable;
2675 PCI_ROM(0x14e4, 0x164a,
"bnx2-5706",
"Broadcom NetXtreme II BCM5706", 0),
2676 PCI_ROM(0x14e4, 0x164c,
"bnx2-5708",
"Broadcom NetXtreme II BCM5708", 0),
2677 PCI_ROM(0x14e4, 0x16aa,
"bnx2-5706S",
"Broadcom NetXtreme II BCM5706S", 0),
2678 PCI_ROM(0x14e4, 0x16ac,
"bnx2-5708S",
"Broadcom NetXtreme II BCM5708S", 0),
#define BCM5708S_1000X_CTL2
#define BNX2_RPM_SORT_USER0_MC_EN
#define PHY_RESET_MAX_WAIT
static const u32 bnx2_COM_b06FwDataAddr
#define BCM5708S_1000X_STAT1
static u32 bnx2_reg_rd_ind(struct bnx2 *bp, u32 offset)
static void bnx2_report_link(struct bnx2 *bp)
static const int bnx2_TXP_b06FwReleaseMajor
#define BNX2_TPAT_CPU_PROGRAM_COUNTER
#define L2_FHDR_ERRORS_ALIGNMENT
struct arbelprm_rc_send_wqe rc
static void bnx2_disable(struct nic *nic __unused)
static u32 bnx2_RXP_b06FwSbssAddr
#define BNX2_EMAC_MULTICAST_HASH0
#define SEEPROM_BYTE_ADDR_MASK
#define BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID
#define BNX2_NVM_ACCESS_ENABLE_EN
#define BNX2_RBUF_COMMAND
#define BNX2_FW_MSG_STATUS_MASK
#define BNX2_RBUF_FW_BUF_ALLOC
#define BCM5708S_1000X_STAT1_SPEED_10
#define BNX2_RBUF_STATUS1
static const u32 bnx2_TPAT_b06FwTextAddr
#define BNX2_EMAC_MODE_MPKT
#define BNX2_RXP_CPU_MODE
static const int bnx2_TPAT_b06FwTextLen
int printf(const char *fmt,...)
Write a formatted string to the console.
#define BCM5708S_1000X_STAT1_TX_PAUSE
#define ADVERTISE_1000FULL
static int bnx2_poll_link(struct bnx2 *bp)
#define BNX2_PCICFG_MISC_CONFIG_REG_WINDOW_ENA
#define BNX2_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP
#define BNX2_RV2P_PROC1_ADDR_CMD
#define EBUSY
Device or resource busy.
#define BNX2_LINK_STATUS_1000HALF
static const int bnx2_TXP_b06FwSbssLen
#define BCM5708S_1000X_CTL1_AUTODET_EN
static unsigned int unsigned int reg
#define BNX2_TPAT_CPU_MODE
#define ADVERTISE_1000XPAUSE
#define BNX2_LINK_STATUS_AN_ENABLED
#define BNX2_TPAT_CPU_INSTRUCTION
#define BNX2_COM_CPU_MODE_SOFT_HALT
static int bnx2_5708s_linkup(struct bnx2 *bp)
#define BNX2_COM_CPU_MODE_STEP_ENA
unsigned char rx_buf[RX_BUF_CNT][RX_BUF_SIZE]
#define BUFFERED_FLASH_PAGE_SIZE
static int bnx2_RXP_b06FwRodataLen
#define SEEPROM_PAGE_SIZE
static int bnx2_reset_chip(struct bnx2 *bp, u32 reset_code)
#define PHY_ALL_1000_SPEED
static struct pci_device_id bnx2_nics[]
static int bnx2_set_link(struct bnx2 *bp)
#define VALID_LINK_TIMEOUT
unsigned long ioaddr
I/O address.
static u32 bnx2_COM_b06FwRodata[(0x58/4)+1]
struct statistics_block stats_blk
static const int bnx2_COM_b06FwRodataLen
#define BNX2_LINK_STATUS_10FULL
#define BNX2_RXP_CPU_INSTRUCTION
static const u32 bnx2_COM_b06FwRodataAddr
#define BCM5708S_BLK_ADDR_DIG
#define BNX2_DRV_MSG_CODE_RESET
#define BNX2_DRV_MSG_CODE
#define BNX2_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_133MHZ
#define BNX2_RV2P_PROC1_ADDR_CMD_RDWR
#define BNX2_DRV_MSG_DATA_WAIT0
#define PCI_PM_CTRL_PME_STATUS
PME pin status.
#define BNX2_DRV_MSG_DATA_WAIT1
#define BNX2_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_66MHZ
#define ADVERTISED_100baseT_Half
static int bnx2_init_chip(struct bnx2 *bp)
#define BNX2_TXP_CPU_REG_FILE
uint32_t type
Operating system type.
static int bnx2_RXP_b06FwTextLen
int pci_write_config_word(struct pci_device *pci, unsigned int where, uint16_t value)
Write 16-bit word to PCI configuration space.
static int bnx2_setup_phy(struct bnx2 *bp)
#define PCI_CAP_ID_PM
Power management.
#define BNX2_TXP_CPU_MODE
#define BNX2_EMAC_TX_MODE
static const int bnx2_COM_b06FwReleaseMajor
#define BNX2_EMAC_RX_MODE
static const u32 bnx2_COM_b06FwStartAddr
uint8_t size
Entry size (in 32-bit words)
static void bnx2_transmit(struct nic *nic, const char *dst_addr, unsigned int type, unsigned int size, const char *packet)
#define BNX2_EMAC_MODE_PORT_MII
#define REG_WR(bp, offset, val)
#define BNX2_HC_TX_QUICK_CONS_TRIP
#define BNX2_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_48MHZ
#define BNX2_NVM_ACCESS_ENABLE
static const int bnx2_TPAT_b06FwReleaseFix
#define PHY_2_5G_CAPABLE_FLAG
#define BNX2_EMAC_RX_MODE_FLOW_EN
#define BNX2_L2CTX_TBDR_BHADDR_LO
#define BNX2_RXP_CPU_EVENT_MASK
#define BNX2_EMAC_BACKOFF_SEED
struct status_block status_blk
static const u32 bnx2_COM_b06FwBssAddr
#define BNX2_PCICFG_MISC_STATUS
static int bnx2_copper_linkup(struct bnx2 *bp)
#define ADVERTISE_100FULL
#define BNX2_PCICFG_MISC_CONFIG
#define PHY_INT_MODE_MASK_FLAG
#define PCI_BASE_ADDRESS_0
#define BNX2_EMAC_RX_MODE_PROMISCUOUS
static u32 bnx2_TPAT_b06FwBss[(0x250/4)+1]
#define BNX2_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET
int pci_read_config_word(struct pci_device *pci, unsigned int where, uint16_t *value)
Read 16-bit word from PCI configuration space.
static const u32 bnx2_COM_b06FwTextAddr
#define BNX2_RV2P_COMMAND_PROC2_RESET
struct rx_bd rx_desc_ring[RX_DESC_CNT]
#define PCI_COMMAND
PCI command.
static const u32 bnx2_TXP_b06FwDataAddr
#define BNX2_EMAC_MODE_PORT_GMII
#define HOST_VIEW_SHMEM_BASE
#define BNX2_RBUF_FW_BUF_ALLOC_VALUE
static int bnx2_RXP_b06FwDataLen
static int bnx2_setup_serdes_phy(struct bnx2 *bp)
#define BNX2_DEV_INFO_BC_REV
static int bnx2_init_5708s_phy(struct bnx2 *bp)
#define BNX2_PORT_HW_CFG_MAC_UPPER
#define BNX2_L2CTX_CTX_TYPE
#define BNX2_DRV_PULSE_MB
#define BNX2_RXP_CPU_MODE_SOFT_HALT
#define BNX2_RPM_SORT_USER0_BC_EN
#define BNX2_TPAT_CPU_HW_BREAKPOINT
#define BNX2_CTX_PAGE_TBL
void adjust_pci_device(struct pci_device *pci)
Enable PCI device.
#define BNX2_NVM_ACCESS_ENABLE_WR_EN
#define BNX2_EMAC_MDIO_COMM_COMMAND_WRITE
#define BUFFERED_FLASH_BYTE_ADDR_MASK
static void load_cpu_fw(struct bnx2 *bp, struct cpu_reg *cpu_reg, struct fw_info *fw)
#define BNX2_SHARED_HW_CFG_PHY_2_5G
#define ETHTOOL_ALL_COPPER_SPEED
#define BNX2_RV2P_PROC2_ADDR_CMD
#define BCM5708S_1000X_CTL2_PLLEL_DET_EN
#define SAIFUN_FLASH_PAGE_BITS
#define BNX2_L2CTX_CTX_TYPE_SIZE_L2
#define BNX2_LINK_STATUS_AN_COMPLETE
int dummy_connect(struct nic *nic __unused)
#define BNX2_L2CTX_TX_HOST_BSEQ
#define BNX2_TPAT_CPU_MODE_SOFT_HALT
static u32 bnx2_RXP_b06FwTextAddr
static const int bnx2_TPAT_b06FwSbssLen
#define BNX2_PCICFG_STATUS_BIT_CLEAR_CMD
#define BNX2_SHM_HDR_SIGNATURE
#define BNX2_PORT_FEATURE_ASF_ENABLED
#define BNX2_SHARED_HW_CFG2_NVM_SIZE_MASK
#define BNX2_EMAC_RX_MODE_SORT_MODE
static const u32 bnx2_COM_b06FwSbssAddr
#define L2_FHDR_ERRORS_BAD_CRC
static __always_inline void * bus_to_virt(unsigned long bus_addr)
Convert bus address to a virtual address.
static u32 bnx2_TXP_b06FwRodata[(0x0/4)+1]
PCI_DRIVER(bnx2_driver, bnx2_nics, PCI_NO_CLASS)
#define BNX2_TXP_CPU_EVENT_MASK
#define BNX2_HC_STATUS_ADDR_H
#define BNX2_SHM_HDR_ADDR_0
static const int bnx2_COM_b06FwReleaseMinor
#define BNX2_EMAC_MDIO_COMM_START_BUSY
#define MB_KERNEL_CTX_SIZE
#define REG_RD_IND(bp, offset)
#define BNX2_RV2P_INSTR_HIGH
static const int bnx2_COM_b06FwBssLen
#define SEEPROM_TOTAL_SIZE
static u32 bnx2_TPAT_b06FwRodata[(0x0/4)+1]
static int bnx2_read_phy(struct bnx2 *bp, u32 reg, u32 *val)
static u32 bnx2_TXP_b06FwSbss[(0x38/4)+1]
static const u32 bnx2_TPAT_b06FwDataAddr
static int bnx2_reset_phy(struct bnx2 *bp)
#define BNX2_L2CTX_CTX_TYPE_CTX_BD_CHN_TYPE_VALUE
static struct bss bnx2_bss
#define BNX2_EMAC_STATUS_LINK
#define ADVERTISE_1000XHALF
#define BNX2_RV2P_PROC2_ADDR_CMD_RDWR
static void bnx2_set_mac_addr(struct bnx2 *bp)
#define BCM5708S_1000X_CTL1
static int bnx2_RXP_b06FwSbssLen
void * memcpy(void *dest, const void *src, size_t len) __nonnull
static const int bnx2_COM_b06FwTextLen
#define BNX2_L2CTX_HOST_BDIDX
static const u32 bnx2_TPAT_b06FwBssAddr
#define BNX2_HC_CMD_TICKS
static __always_inline unsigned long virt_to_bus(volatile const void *addr)
Convert virtual address to a bus address.
#define BNX2_MQ_KNL_BYP_WIND_START
#define PHY_ALL_10_100_SPEED
#define PCI_PM_CTRL_STATE_MASK
Current power state.
#define BNX2_TPAT_CPU_MODE_STEP_ENA
static u32 bnx2_TXP_b06FwBss[(0x1c4/4)+1]
#define BNX2_LINK_STATUS_2500FULL
#define BNX2_DMA_CONFIG_CNTL_BYTE_SWAP
static void bnx2_enable_nvram_access(struct bnx2 *bp)
#define BNX2_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_80MHZ
#define STATUS_ATTN_BITS_LINK_STATE
#define BNX2_SHARED_HW_CFG_CONFIG
static int bnx2_set_power_state_0(struct bnx2 *bp)
#define BNX2_HC_COMP_PROD_TRIP
#define BNX2_TXP_CPU_INSTRUCTION
static u32 bnx2_TXP_b06FwText[(0x5748/4)+1]
#define BNX2_COM_CPU_STATE
#define PHY_INT_MODE_LINK_READY_FLAG
#define ADVERTISED_Autoneg
#define BCM5708S_TX_ACTL1_DRIVER_VCM
static u32 bnx2_RXP_b06FwRodataAddr
#define BNX2_L2CTX_TBDR_BHADDR_HI
#define __unused
Declare a variable or data structure as unused.
static int bnx2_5706s_linkup(struct bnx2 *bp)
#define SAIFUN_FLASH_BYTE_ADDR_MASK
#define BNX2_RV2P_INSTR_LOW
#define BNX2_MQ_CONFIG_KNL_BYP_BLK_SIZE
#define BNX2_PCICFG_MISC_STATUS_32BIT_DET
#define BNX2_DMA_CONFIG_DATA_BYTE_SWAP
static int bnx2_alloc_bad_rbuf(struct bnx2 *bp)
static int bnx2_reset_nic(struct bnx2 *bp, u32 reset_code)
#define TX_BD_FLAGS_START
#define BNX2_DRV_MSG_DATA_WAIT2
#define BNX2_COM_CPU_INSTRUCTION
#define BNX2_L2CTX_NX_BDHADDR_HI
void udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
#define BMSR_ANEGCOMPLETE
#define BNX2_MISC_ENABLE_CLR_BITS_DMA_ENGINE_ENABLE
static struct nic_operations bnx2_operations
static int bnx2_init_board(struct pci_device *pdev, struct nic *nic)
#define BNX2_LINK_STATUS_10HALF
unsigned long pci_bar_start(struct pci_device *pci, unsigned int reg)
Find the start of a PCI BAR.
#define MAX_ETHERNET_PACKET_SIZE
#define BNX2_HC_STATISTICS_ADDR_H
#define BCM5708S_BLK_ADDR_TX_MISC
static void bnx2_ctx_wr(struct bnx2 *bp, u32 cid_addr, u32 offset, u32 val)
static const int bnx2_TPAT_b06FwBssLen
#define BNX2_MISC_ENABLE_CLR_BITS
#define BNX2_EMAC_ATTENTION_ENA_LINK
#define BNX2_RXP_CPU_PROGRAM_COUNTER
#define BNX2_EMAC_MAC_MATCH1
static const int bnx2_TPAT_b06FwReleaseMajor
#define BNX2_EMAC_MODE_PORT_MII_10
#define BNX2_TPAT_CPU_STATE
#define BNX2_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_38MHZ
#define BCM5708S_BLK_ADDR
#define BNX2_LINK_STATUS_100FULL
#define BNX2_HC_STATS_TICKS
#define BUFFERED_FLASH_TOTAL_SIZE
#define ADVERTISE_1000XPSE_ASYM
#define BCM5708S_1000X_STAT1_SPEED_MASK
#define BNX2_MISC_UNUSED0
static int bnx2_init_phy(struct bnx2 *bp)
#define BNX2_HC_STATISTICS_ADDR_L
static void bnx2_disable_nvram_access(struct bnx2 *bp)
#define BNX2_RV2P_COMMAND_PROC1_RESET
#define BNX2_PCICFG_MISC_STATUS_PCIX_DET
#define BNX2_COM_CPU_REG_FILE
#define BNX2_HC_CONFIG_TX_TMR_MODE
#define BNX2_EMAC_MAC_MATCH0
#define BNX2_PCICFG_STATUS_BIT_SET_CMD
#define BNX2_EMAC_MDIO_COMM_COMMAND_READ
#define BNX2_DRV_MSG_DATA
static const int bnx2_TXP_b06FwDataLen
static void bnx2_init_cpus(struct bnx2 *bp)
#define ADVERTISE_PAUSE_ASYM
#define AUTONEG_FLOW_CTRL
#define FLASH_BACKUP_STRAP_MASK
static u32 bnx2_phy_get_pause_adv(struct bnx2 *bp)
static int bnx2_init_nic(struct bnx2 *bp)
static u32 bnx2_COM_b06FwBss[(0x88/4)+1]
#define PCI_PM_CTRL
Power management control and status.
#define BNX2_HC_RX_QUICK_CONS_TRIP
static u32 bnx2_TXP_b06FwData[(0x0/4)+1]
#define BCM5708S_1000X_STAT1_FD
#define BCM5708S_1000X_CTL1_FIBER_MODE
struct tx_bd tx_desc_ring[TX_DESC_CNT]
static const int bnx2_TXP_b06FwRodataLen
#define BNX2_EMAC_STATUS_LINK_CHANGE
#define NUM_MC_HASH_REGISTERS
#define BNX2_TXP_CPU_HW_BREAKPOINT
static u32 bnx2_RXP_b06FwSbss[(0x1c/4)+1]
#define REG_RD(bp, offset)
static const int bnx2_COM_b06FwDataLen
#define BCM5708S_BLK_ADDR_DIG3
#define BNX2_PCICFG_MISC_STATUS_M66EN
const char * eth_ntoa(const void *ll_addr)
Transcribe Ethernet address.
static int bnx2_RXP_b06FwReleaseMajor
#define BNX2_TXP_CPU_MODE_STEP_ENA
#define BNX2_HC_COM_TICKS
static const int bnx2_TPAT_b06FwRodataLen
#define BNX2_DRV_RESET_SIGNATURE
#define BNX2_TPAT_CPU_EVENT_MASK
#define BNX2_HC_COMMAND_CLR_STAT_NOW
#define BNX2_EMAC_MODE_FORCE_LINK
#define BNX2_PORT_FEATURE
static const u32 bnx2_TXP_b06FwRodataAddr
static void bnx2_init_rx_ring(struct bnx2 *bp)
#define BNX2_PCICFG_INT_ACK_CMD_MASK_INT
#define BCM5708S_TX_ACTL3
#define GET_PCID_ADDR(_pcid)
static int bnx2_setup_copper_phy(struct bnx2 *bp)
#define BNX2_PCICFG_REG_WINDOW
static int bnx2_fw_sync(struct bnx2 *bp, u32 msg_data, int silent)
#define ENODEV
No such device.
DRIVER("BNX2", nic_driver, pci_driver, bnx2_driver, bnx2_probe, bnx2_disable)
#define BNX2_EMAC_TX_MODE_FLOW_EN
#define BNX2_PCICFG_MISC_CONFIG_CORE_RST_BSY
#define GET_CID_ADDR(_cid)
#define RX_BD_FLAGS_START
#define BNX2_TXP_CPU_PROGRAM_COUNTER
static u32 bnx2_RXP_b06FwRodata[(0x28/4)+1]
static u32 bnx2_RXP_b06FwBssAddr
#define L2_FHDR_ERRORS_GIANT_FRAME
#define BNX2_SHM_HDR_SIGNATURE_SIG
#define BNX2_SHM_HDR_SIGNATURE_SIG_MASK
#define SERDES_AN_TIMEOUT
#define SAIFUN_FLASH_BASE_TOTAL_SIZE
static u32 bnx2_COM_b06FwSbss[(0x1c/4)+1]
#define BNX2_L2CTX_CMD_TYPE
#define BNX2_HC_STATUS_ADDR_L
#define BNX2_EMAC_MODE_ACPI_RCVD
#define BNX2_DMA_CONFIG_DATA_WORD_SWAP
A PCI device ID list entry.
#define ADVERTISE_1000HALF
#define BNX2_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_LOW
#define BNX2_DRV_MSG_CODE_FW_TIMEOUT
#define BNX2_DEV_INFO_SIGNATURE_MAGIC_MASK
static const u32 bnx2_TXP_b06FwBssAddr
struct ib_cm_common common
#define PCI_COMMAND_SERR
SERR# enable.
static u32 bnx2_rv2p_proc1[]
#define BNX2_TDMA_CONFIG_ONE_DMA
#define BNX2_PCICFG_MISC_CONFIG_CORE_RST_REQ
#define BNX2_CTX_VIRT_ADDR
static const int bnx2_COM_b06FwReleaseFix
#define BNX2_DRV_MSG_CODE_UNLOAD
#define BNX2_SHARED_HW_CFG_PHY_BACKPLANE
static const int bnx2_TPAT_b06FwReleaseMinor
#define BNX2_L2CTX_TX_HOST_BIDX
static void load_rv2p_fw(struct bnx2 *bp, u32 *rv2p_code, u32 rv2p_code_len, u32 rv2p_proc)
u8 data[ETH_FRAME_LEN - ETH_HLEN]
#define BNX2_LINK_STATUS_PARALLEL_DET
#define BNX2_MISC_ENABLE_CLR_BITS_HOST_COALESCE_ENABLE
#define BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG
static int bnx2_init_copper_phy(struct bnx2 *bp)
#define BNX2_HC_COMMAND_COAL_NOW_WO_INT
static void bnx2_disable_int(struct bnx2 *bp)
#define BNX2_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_55MHZ
static const int bnx2_COM_b06FwSbssLen
static int bnx2_init_5706s_phy(struct bnx2 *bp)
static void bnx2_init_context(struct bnx2 *bp)
static void bnx2_irq(struct nic *nic __unused, irq_action_t action __unused)
#define BNX2_RPM_CONFIG_ACPI_ENA
#define BNX2_SHARED_HW_CFG_CONFIG2
static int bnx2_write_phy(struct bnx2 *bp, u32 reg, u32 val)
#define REG_WR16(bp, offset, val)
#define BNX2_MISC_ENABLE_CLR_BITS_TX_DMA_ENABLE
void mdelay(unsigned long msecs)
Delay for a fixed number of milliseconds.
#define BNX2_LINK_STATUS_LINK_UP
#define BCM5708S_1000X_STAT1_RX_PAUSE
#define CTX_WR(bp, cid_addr, offset, val)
static void bnx2_report_fw_link(struct bnx2 *bp)
#define BNX2_MISC_ENABLE_STATUS_BITS_RX_V2P_ENABLE
static int bnx2_probe(struct nic *nic, struct pci_device *pdev)
unsigned char * node_addr
static void bnx2_init_tx_ring(struct bnx2 *bp)
static u32 bnx2_RXP_b06FwStartAddr
#define BNX2_EMAC_MDIO_COMM
#define BNX2_EMAC_MODE_PORT
#define L2_FHDR_ERRORS_TOO_SHORT
static u32 bnx2_rv2p_proc2[]
#define BNX2_PCICFG_REG_WINDOW_ADDRESS
static u32 bnx2_COM_b06FwText[(0x57bc/4)+1]
Media Independent Interface constants.
#define BNX2_TPAT_CPU_REG_FILE
#define BNX2_EMAC_TX_LENGTHS
#define BNX2_MISC_ENABLE_SET_BITS_HOST_COALESCE_ENABLE
#define BNX2_RXP_CPU_HW_BREAKPOINT
#define BNX2_HC_CONFIG_COLLECT_STATS
#define BNX2_CTX_DATA_ADR
#define BNX2_PORT_HW_CFG_CFG_DFLT_LINK_MASK
#define FW_ACK_TIME_OUT_MS
#define PCI_COMMAND_PARITY
Parity error response.
#define EIO
Input/output error.
#define BNX2_L2CTX_HOST_BSEQ
#define ST_MICRO_FLASH_BASE_TOTAL_SIZE
#define BNX2_TXP_CPU_STATE
#define BNX2_EMAC_MDIO_MODE_AUTO_POLL
int pci_write_config_dword(struct pci_device *pci, unsigned int where, uint32_t value)
Write 32-bit dword to PCI configuration space.
static u32 bnx2_RXP_b06FwData[(0x0/4)+1]
#define MB_GET_CID_ADDR(_cid)
#define ST_MICRO_FLASH_PAGE_SIZE
#define BUFFERED_FLASH_PAGE_BITS
static int bnx2_set_mac_link(struct bnx2 *bp)
#define BNX2_PCICFG_INT_ACK_CMD
#define BNX2_TPAT_SCRATCH
static const int bnx2_TXP_b06FwReleaseFix
static u32 bnx2_RXP_b06FwBss[(0x13a4/4)+1]
void iounmap(volatile const void *io_addr)
Unmap I/O address.
#define BNX2_PCICFG_MISC_STATUS_INTA_VALUE
uint8_t data[48]
Additional event data.
#define BNX2_RBUF_COMMAND_ALLOC_REQ
#define ADVERTISED_10baseT_Full
#define BNX2_L2CTX_CMD_TYPE_TYPE_L2
#define BNX2_EMAC_RX_MTU_SIZE
#define BNX2_DRV_RESET_SIGNATURE_MAGIC
#define BNX2_EMAC_MODE_MPKT_RCVD
#define BNX2_MISC_ENABLE_SET_BITS
#define BCM5708S_1000X_STAT1_SPEED_100
#define BNX2_PORT_HW_CFG_MAC_LOWER
#define BNX2_EMAC_ATTENTION_ENA
#define BNX2_RPM_SORT_USER0_ENA
#define BNX2_MISC_ENABLE_SET_BITS_RX_MBUF_ENABLE
#define BNX2_FW_MSG_STATUS_OK
#define REG_WR_IND(bp, offset, val)
#define BNX2_RV2P_COMMAND
static const u32 bnx2_TXP_b06FwSbssAddr
#define BNX2_COM_CPU_MODE
#define PHY_PARALLEL_DETECT_FLAG
#define BNX2_LINK_STATUS_100HALF
#define BNX2_LINK_STATUS_1000FULL
static u32 bnx2_TPAT_b06FwText[(0x122c/4)+1]
uint16_t offset
Offset to command line.
#define BNX2_DMA_CONFIG_CNTL_PING_PONG_DMA
#define BNX2_L2CTX_TYPE_SIZE_L2
#define BNX2_MQ_CONFIG_KNL_BYP_BLK_SIZE_256
#define BNX2_MQ_KNL_WIND_END
static const int bnx2_TXP_b06FwReleaseMinor
#define BNX2_RBUF_STATUS1_FREE_COUNT
#define BNX2_EMAC_MODE_HALF_DUPLEX
#define ADVERTISE_PAUSE_CAP
#define BNX2_COM_CPU_EVENT_MASK
#define BNX2_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_32MHZ
#define BNX2_PORT_HW_CFG_CFG_DFLT_LINK_1G
static void bnx2_resolve_flow_ctrl(struct bnx2 *bp)
#define ADVERTISE_100HALF
#define BNX2_MISC_VREG_CONTROL
#define BNX2_L2CTX_TYPE_TYPE_L2
#define BNX2_EMAC_MDIO_MODE
static const int bnx2_TXP_b06FwBssLen
#define ETHTOOL_ALL_FIBRE_SPEED
static struct flash_spec flash_table[]
#define ST_MICRO_FLASH_PAGE_BITS
#define BNX2_PORT_HW_CFG_CFG_TXCTL3_MASK
#define BNX2_HC_CONFIG_RX_TMR_MODE
#define BNX2_RXP_CPU_STATE
#define BNX2_LINK_STATUS_LINK_DOWN
#define BNX2_DEV_INFO_SIGNATURE
static u32 bnx2_RXP_b06FwDataAddr
#define BNX2_DEV_INFO_SIGNATURE_MAGIC
struct nic_operations * nic_op
#define BNX2_EMAC_MDIO_COMM_DISEXT
void * pci_ioremap(struct pci_device *pci, unsigned long bus_addr, size_t len)
Map PCI bus address as an I/O address.
#define BNX2_EMAC_MDIO_COMM_DATA
static int bnx2_RXP_b06FwReleaseMinor
#define BNX2_EMAC_MODE_25G
static const u32 bnx2_TPAT_b06FwStartAddr
static int bnx2_init_nvram(struct bnx2 *bp)
#define BNX2_LINK_STATUS_2500HALF
static void bnx2_reg_wr_ind(struct bnx2 *bp, u32 offset, u32 val)
#define BCM5708S_1000X_STAT1_SPEED_2G5
#define BNX2_RPM_SORT_USER0
#define BNX2_RXP_CPU_REG_FILE
#define BCM5708S_TX_ACTL1
#define ADVERTISED_1000baseT_Full
static const int bnx2_TXP_b06FwTextLen
static const u32 bnx2_TPAT_b06FwRodataAddr
static const u32 bnx2_TPAT_b06FwSbssAddr
int(* connect)(struct nic *)
#define BNX2_COM_CPU_HW_BREAKPOINT
#define NULL
NULL pointer (VOID *)
#define L2_FHDR_ERRORS_PHY_DECODE
#define BNX2_MISC_ENABLE_CLR_BITS_RX_DMA_ENABLE
#define ADVERTISED_100baseT_Full
static int bnx2_alloc_mem(struct bnx2 *bp)
#define SAIFUN_FLASH_PAGE_SIZE
static int bnx2_RXP_b06FwReleaseFix
static int bnx2_poll(struct nic *nic, int retrieve)
#define BNX2_DRV_MSG_DATA_PULSE_CODE_ALWAYS_ALIVE
#define PCI_ROM(_vendor, _device, _name, _description, _data)
#define BNX2_RBUF_FW_BUF_FREE
static u32 bnx2_TPAT_b06FwData[(0x0/4)+1]
#define PHY_INT_MODE_AUTO_POLLING_FLAG
#define BNX2_RXP_CPU_MODE_STEP_ENA
#define BCM5708S_DIG_3_0_USE_IEEE
#define BNX2_TXP_CPU_MODE_SOFT_HALT
#define ADVERTISED_10baseT_Half
static u32 bnx2_RXP_b06FwText[(0x588c/4)+1]
#define BNX2_MISC_ENABLE_STATUS_BITS_CONTEXT_ENABLE
#define SEEPROM_PAGE_BITS
static int bnx2_RXP_b06FwBssLen
#define BNX2_PORT_HW_CFG_CONFIG
static const int bnx2_TPAT_b06FwDataLen
#define BNX2_PCICFG_PCI_CLOCK_CONTROL_BITS_PCI_CLK_SPD_DET_95MHZ
#define BCM5708S_1000X_STAT1_SPEED_1G
#define CHIP_BOND_ID_SERDES_BIT
static void bnx2_set_rx_mode(struct nic *nic __unused)
#define BNX2_L2CTX_NX_BDHADDR_LO
#define BNX2_HC_STAT_COLLECT_TICKS
static u32 bnx2_COM_b06FwData[(0x0/4)+1]
#define BNX2_HC_ATTN_BITS_ENABLE
static u32 bnx2_TPAT_b06FwSbss[(0x34/4)+1]
#define BNX2_DMA_CONFIG_CNTL_WORD_SWAP
#define BNX2_EMAC_MODE_MAC_LOOP
static const u32 bnx2_TXP_b06FwStartAddr
#define ADVERTISE_1000XFULL
#define BNX2_PCI_SWAP_DIAG0
#define BNX2_TBDR_CONFIG_PAGE_SIZE
static const u32 bnx2_TXP_b06FwTextAddr
#define BNX2_COM_CPU_PROGRAM_COUNTER
#define ST_MICRO_FLASH_BYTE_ADDR_MASK
void * memset(void *dest, int character, size_t len) __nonnull
#define BNX2_PCICFG_PCI_CLOCK_CONTROL_BITS
#define BNX2_EMAC_RX_MTU_SIZE_JUMBO_ENA