diff options
Diffstat (limited to 'drivers/net/bnx2.h')
-rw-r--r-- | drivers/net/bnx2.h | 65 |
1 files changed, 57 insertions, 8 deletions
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index 878eee58f12a..bd6288d6350f 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* bnx2.h: Broadcom NX2 network driver. | 1 | /* bnx2.h: Broadcom NX2 network driver. |
2 | * | 2 | * |
3 | * Copyright (c) 2004, 2005, 2006 Broadcom Corporation | 3 | * Copyright (c) 2004-2007 Broadcom Corporation |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
@@ -24,8 +24,11 @@ struct tx_bd { | |||
24 | u32 tx_bd_haddr_hi; | 24 | u32 tx_bd_haddr_hi; |
25 | u32 tx_bd_haddr_lo; | 25 | u32 tx_bd_haddr_lo; |
26 | u32 tx_bd_mss_nbytes; | 26 | u32 tx_bd_mss_nbytes; |
27 | #define TX_BD_TCP6_OFF2_SHL (14) | ||
27 | u32 tx_bd_vlan_tag_flags; | 28 | u32 tx_bd_vlan_tag_flags; |
28 | #define TX_BD_FLAGS_CONN_FAULT (1<<0) | 29 | #define TX_BD_FLAGS_CONN_FAULT (1<<0) |
30 | #define TX_BD_FLAGS_TCP6_OFF0_MSK (3<<1) | ||
31 | #define TX_BD_FLAGS_TCP6_OFF0_SHL (1) | ||
29 | #define TX_BD_FLAGS_TCP_UDP_CKSUM (1<<1) | 32 | #define TX_BD_FLAGS_TCP_UDP_CKSUM (1<<1) |
30 | #define TX_BD_FLAGS_IP_CKSUM (1<<2) | 33 | #define TX_BD_FLAGS_IP_CKSUM (1<<2) |
31 | #define TX_BD_FLAGS_VLAN_TAG (1<<3) | 34 | #define TX_BD_FLAGS_VLAN_TAG (1<<3) |
@@ -34,6 +37,7 @@ struct tx_bd { | |||
34 | #define TX_BD_FLAGS_END (1<<6) | 37 | #define TX_BD_FLAGS_END (1<<6) |
35 | #define TX_BD_FLAGS_START (1<<7) | 38 | #define TX_BD_FLAGS_START (1<<7) |
36 | #define TX_BD_FLAGS_SW_OPTION_WORD (0x1f<<8) | 39 | #define TX_BD_FLAGS_SW_OPTION_WORD (0x1f<<8) |
40 | #define TX_BD_FLAGS_TCP6_OFF4_SHL (12) | ||
37 | #define TX_BD_FLAGS_SW_FLAGS (1<<13) | 41 | #define TX_BD_FLAGS_SW_FLAGS (1<<13) |
38 | #define TX_BD_FLAGS_SW_SNAP (1<<14) | 42 | #define TX_BD_FLAGS_SW_SNAP (1<<14) |
39 | #define TX_BD_FLAGS_SW_LSO (1<<15) | 43 | #define TX_BD_FLAGS_SW_LSO (1<<15) |
@@ -6292,6 +6296,41 @@ struct l2_fhdr { | |||
6292 | #define MII_BNX2_DSP_ADDRESS 0x17 | 6296 | #define MII_BNX2_DSP_ADDRESS 0x17 |
6293 | #define MII_BNX2_DSP_EXPAND_REG 0x0f00 | 6297 | #define MII_BNX2_DSP_EXPAND_REG 0x0f00 |
6294 | 6298 | ||
6299 | #define MII_BNX2_BLK_ADDR 0x1f | ||
6300 | #define MII_BNX2_BLK_ADDR_IEEE0 0x0000 | ||
6301 | #define MII_BNX2_BLK_ADDR_GP_STATUS 0x8120 | ||
6302 | #define MII_BNX2_GP_TOP_AN_STATUS1 0x1b | ||
6303 | #define MII_BNX2_GP_TOP_AN_SPEED_MSK 0x3f00 | ||
6304 | #define MII_BNX2_GP_TOP_AN_SPEED_10 0x0000 | ||
6305 | #define MII_BNX2_GP_TOP_AN_SPEED_100 0x0100 | ||
6306 | #define MII_BNX2_GP_TOP_AN_SPEED_1G 0x0200 | ||
6307 | #define MII_BNX2_GP_TOP_AN_SPEED_2_5G 0x0300 | ||
6308 | #define MII_BNX2_GP_TOP_AN_SPEED_1GKV 0x0d00 | ||
6309 | #define MII_BNX2_GP_TOP_AN_FD 0x8 | ||
6310 | #define MII_BNX2_BLK_ADDR_SERDES_DIG 0x8300 | ||
6311 | #define MII_BNX2_SERDES_DIG_1000XCTL1 0x10 | ||
6312 | #define MII_BNX2_SD_1000XCTL1_FIBER 0x01 | ||
6313 | #define MII_BNX2_SD_1000XCTL1_AUTODET 0x10 | ||
6314 | #define MII_BNX2_SERDES_DIG_MISC1 0x18 | ||
6315 | #define MII_BNX2_SD_MISC1_FORCE_MSK 0xf | ||
6316 | #define MII_BNX2_SD_MISC1_FORCE_2_5G 0x0 | ||
6317 | #define MII_BNX2_SD_MISC1_FORCE 0x10 | ||
6318 | #define MII_BNX2_BLK_ADDR_OVER1G 0x8320 | ||
6319 | #define MII_BNX2_OVER1G_UP1 0x19 | ||
6320 | #define MII_BNX2_BLK_ADDR_BAM_NXTPG 0x8350 | ||
6321 | #define MII_BNX2_BAM_NXTPG_CTL 0x10 | ||
6322 | #define MII_BNX2_NXTPG_CTL_BAM 0x1 | ||
6323 | #define MII_BNX2_NXTPG_CTL_T2 0x2 | ||
6324 | #define MII_BNX2_BLK_ADDR_CL73_USERB0 0x8370 | ||
6325 | #define MII_BNX2_CL73_BAM_CTL1 0x12 | ||
6326 | #define MII_BNX2_CL73_BAM_EN 0x8000 | ||
6327 | #define MII_BNX2_CL73_BAM_STA_MGR_EN 0x4000 | ||
6328 | #define MII_BNX2_CL73_BAM_NP_AFT_BP_EN 0x2000 | ||
6329 | #define MII_BNX2_BLK_ADDR_AER 0xffd0 | ||
6330 | #define MII_BNX2_AER_AER 0x1e | ||
6331 | #define MII_BNX2_AER_AER_AN_MMD 0x3800 | ||
6332 | #define MII_BNX2_BLK_ADDR_COMBO_IEEEB0 0xffe0 | ||
6333 | |||
6295 | #define MIN_ETHERNET_PACKET_SIZE 60 | 6334 | #define MIN_ETHERNET_PACKET_SIZE 60 |
6296 | #define MAX_ETHERNET_PACKET_SIZE 1514 | 6335 | #define MAX_ETHERNET_PACKET_SIZE 1514 |
6297 | #define MAX_ETHERNET_JUMBO_PACKET_SIZE 9014 | 6336 | #define MAX_ETHERNET_JUMBO_PACKET_SIZE 9014 |
@@ -6429,13 +6468,15 @@ struct bnx2 { | |||
6429 | u32 last_status_idx; | 6468 | u32 last_status_idx; |
6430 | 6469 | ||
6431 | u32 flags; | 6470 | u32 flags; |
6432 | #define PCIX_FLAG 1 | 6471 | #define PCIX_FLAG 0x00000001 |
6433 | #define PCI_32BIT_FLAG 2 | 6472 | #define PCI_32BIT_FLAG 0x00000002 |
6434 | #define ONE_TDMA_FLAG 4 /* no longer used */ | 6473 | #define ONE_TDMA_FLAG 0x00000004 /* no longer used */ |
6435 | #define NO_WOL_FLAG 8 | 6474 | #define NO_WOL_FLAG 0x00000008 |
6436 | #define USING_DAC_FLAG 0x10 | 6475 | #define USING_MSI_FLAG 0x00000020 |
6437 | #define USING_MSI_FLAG 0x20 | 6476 | #define ASF_ENABLE_FLAG 0x00000040 |
6438 | #define ASF_ENABLE_FLAG 0x40 | 6477 | #define MSI_CAP_FLAG 0x00000080 |
6478 | #define ONE_SHOT_MSI_FLAG 0x00000100 | ||
6479 | #define PCIE_FLAG 0x00000200 | ||
6439 | 6480 | ||
6440 | /* Put tx producer and consumer fields in separate cache lines. */ | 6481 | /* Put tx producer and consumer fields in separate cache lines. */ |
6441 | 6482 | ||
@@ -6484,6 +6525,7 @@ struct bnx2 { | |||
6484 | 6525 | ||
6485 | /* Used to synchronize phy accesses. */ | 6526 | /* Used to synchronize phy accesses. */ |
6486 | spinlock_t phy_lock; | 6527 | spinlock_t phy_lock; |
6528 | spinlock_t indirect_lock; | ||
6487 | 6529 | ||
6488 | u32 phy_flags; | 6530 | u32 phy_flags; |
6489 | #define PHY_SERDES_FLAG 1 | 6531 | #define PHY_SERDES_FLAG 1 |
@@ -6495,6 +6537,13 @@ struct bnx2 { | |||
6495 | #define PHY_INT_MODE_LINK_READY_FLAG 0x200 | 6537 | #define PHY_INT_MODE_LINK_READY_FLAG 0x200 |
6496 | #define PHY_DIS_EARLY_DAC_FLAG 0x400 | 6538 | #define PHY_DIS_EARLY_DAC_FLAG 0x400 |
6497 | 6539 | ||
6540 | u32 mii_bmcr; | ||
6541 | u32 mii_bmsr; | ||
6542 | u32 mii_bmsr1; | ||
6543 | u32 mii_adv; | ||
6544 | u32 mii_lpa; | ||
6545 | u32 mii_up1; | ||
6546 | |||
6498 | u32 chip_id; | 6547 | u32 chip_id; |
6499 | /* chip num:16-31, rev:12-15, metal:4-11, bond_id:0-3 */ | 6548 | /* chip num:16-31, rev:12-15, metal:4-11, bond_id:0-3 */ |
6500 | #define CHIP_NUM(bp) (((bp)->chip_id) & 0xffff0000) | 6549 | #define CHIP_NUM(bp) (((bp)->chip_id) & 0xffff0000) |