aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bnx2.h')
-rw-r--r--drivers/net/bnx2.h63
1 files changed, 60 insertions, 3 deletions
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h
index 62857b6a6ee4..c0e88f850493 100644
--- a/drivers/net/bnx2.h
+++ b/drivers/net/bnx2.h
@@ -1449,8 +1449,9 @@ struct l2_fhdr {
1449#define BNX2_EMAC_MODE_PORT_NONE (0L<<2) 1449#define BNX2_EMAC_MODE_PORT_NONE (0L<<2)
1450#define BNX2_EMAC_MODE_PORT_MII (1L<<2) 1450#define BNX2_EMAC_MODE_PORT_MII (1L<<2)
1451#define BNX2_EMAC_MODE_PORT_GMII (2L<<2) 1451#define BNX2_EMAC_MODE_PORT_GMII (2L<<2)
1452#define BNX2_EMAC_MODE_PORT_UNDEF (3L<<2) 1452#define BNX2_EMAC_MODE_PORT_MII_10 (3L<<2)
1453#define BNX2_EMAC_MODE_MAC_LOOP (1L<<4) 1453#define BNX2_EMAC_MODE_MAC_LOOP (1L<<4)
1454#define BNX2_EMAC_MODE_25G (1L<<5)
1454#define BNX2_EMAC_MODE_TAGGED_MAC_CTL (1L<<7) 1455#define BNX2_EMAC_MODE_TAGGED_MAC_CTL (1L<<7)
1455#define BNX2_EMAC_MODE_TX_BURST (1L<<8) 1456#define BNX2_EMAC_MODE_TX_BURST (1L<<8)
1456#define BNX2_EMAC_MODE_MAX_DEFER_DROP_ENA (1L<<9) 1457#define BNX2_EMAC_MODE_MAX_DEFER_DROP_ENA (1L<<9)
@@ -3724,6 +3725,53 @@ struct l2_fhdr {
3724#define PHY_ID(id) ((id) & 0xfffffff0) 3725#define PHY_ID(id) ((id) & 0xfffffff0)
3725#define PHY_REV_ID(id) ((id) & 0xf) 3726#define PHY_REV_ID(id) ((id) & 0xf)
3726 3727
3728/* 5708 Serdes PHY registers */
3729
3730#define BCM5708S_UP1 0xb
3731
3732#define BCM5708S_UP1_2G5 0x1
3733
3734#define BCM5708S_BLK_ADDR 0x1f
3735
3736#define BCM5708S_BLK_ADDR_DIG 0x0000
3737#define BCM5708S_BLK_ADDR_DIG3 0x0002
3738#define BCM5708S_BLK_ADDR_TX_MISC 0x0005
3739
3740/* Digital Block */
3741#define BCM5708S_1000X_CTL1 0x10
3742
3743#define BCM5708S_1000X_CTL1_FIBER_MODE 0x0001
3744#define BCM5708S_1000X_CTL1_AUTODET_EN 0x0010
3745
3746#define BCM5708S_1000X_CTL2 0x11
3747
3748#define BCM5708S_1000X_CTL2_PLLEL_DET_EN 0x0001
3749
3750#define BCM5708S_1000X_STAT1 0x14
3751
3752#define BCM5708S_1000X_STAT1_SGMII 0x0001
3753#define BCM5708S_1000X_STAT1_LINK 0x0002
3754#define BCM5708S_1000X_STAT1_FD 0x0004
3755#define BCM5708S_1000X_STAT1_SPEED_MASK 0x0018
3756#define BCM5708S_1000X_STAT1_SPEED_10 0x0000
3757#define BCM5708S_1000X_STAT1_SPEED_100 0x0008
3758#define BCM5708S_1000X_STAT1_SPEED_1G 0x0010
3759#define BCM5708S_1000X_STAT1_SPEED_2G5 0x0018
3760#define BCM5708S_1000X_STAT1_TX_PAUSE 0x0020
3761#define BCM5708S_1000X_STAT1_RX_PAUSE 0x0040
3762
3763/* Digital3 Block */
3764#define BCM5708S_DIG_3_0 0x10
3765
3766#define BCM5708S_DIG_3_0_USE_IEEE 0x0001
3767
3768/* Tx/Misc Block */
3769#define BCM5708S_TX_ACTL1 0x15
3770
3771#define BCM5708S_TX_ACTL1_DRIVER_VCM 0x30
3772
3773#define BCM5708S_TX_ACTL3 0x17
3774
3727#define MIN_ETHERNET_PACKET_SIZE 60 3775#define MIN_ETHERNET_PACKET_SIZE 60
3728#define MAX_ETHERNET_PACKET_SIZE 1514 3776#define MAX_ETHERNET_PACKET_SIZE 1514
3729#define MAX_ETHERNET_JUMBO_PACKET_SIZE 9014 3777#define MAX_ETHERNET_JUMBO_PACKET_SIZE 9014
@@ -3893,6 +3941,7 @@ struct bnx2 {
3893#define PHY_SERDES_FLAG 1 3941#define PHY_SERDES_FLAG 1
3894#define PHY_CRC_FIX_FLAG 2 3942#define PHY_CRC_FIX_FLAG 2
3895#define PHY_PARALLEL_DETECT_FLAG 4 3943#define PHY_PARALLEL_DETECT_FLAG 4
3944#define PHY_2_5G_CAPABLE_FLAG 8
3896#define PHY_INT_MODE_MASK_FLAG 0x300 3945#define PHY_INT_MODE_MASK_FLAG 0x300
3897#define PHY_INT_MODE_AUTO_POLLING_FLAG 0x100 3946#define PHY_INT_MODE_AUTO_POLLING_FLAG 0x100
3898#define PHY_INT_MODE_LINK_READY_FLAG 0x200 3947#define PHY_INT_MODE_LINK_READY_FLAG 0x200
@@ -3901,6 +3950,7 @@ struct bnx2 {
3901 /* chip num:16-31, rev:12-15, metal:4-11, bond_id:0-3 */ 3950 /* chip num:16-31, rev:12-15, metal:4-11, bond_id:0-3 */
3902#define CHIP_NUM(bp) (((bp)->chip_id) & 0xffff0000) 3951#define CHIP_NUM(bp) (((bp)->chip_id) & 0xffff0000)
3903#define CHIP_NUM_5706 0x57060000 3952#define CHIP_NUM_5706 0x57060000
3953#define CHIP_NUM_5708 0x57080000
3904 3954
3905#define CHIP_REV(bp) (((bp)->chip_id) & 0x0000f000) 3955#define CHIP_REV(bp) (((bp)->chip_id) & 0x0000f000)
3906#define CHIP_REV_Ax 0x00000000 3956#define CHIP_REV_Ax 0x00000000
@@ -3913,6 +3963,9 @@ struct bnx2 {
3913#define CHIP_ID(bp) (((bp)->chip_id) & 0xfffffff0) 3963#define CHIP_ID(bp) (((bp)->chip_id) & 0xfffffff0)
3914#define CHIP_ID_5706_A0 0x57060000 3964#define CHIP_ID_5706_A0 0x57060000
3915#define CHIP_ID_5706_A1 0x57060010 3965#define CHIP_ID_5706_A1 0x57060010
3966#define CHIP_ID_5706_A2 0x57060020
3967#define CHIP_ID_5708_A0 0x57080000
3968#define CHIP_ID_5708_B0 0x57081000
3916 3969
3917#define CHIP_BOND_ID(bp) (((bp)->chip_id) & 0xf) 3970#define CHIP_BOND_ID(bp) (((bp)->chip_id) & 0xf)
3918 3971
@@ -4132,12 +4185,12 @@ struct fw_info {
4132#define BNX2_LINK_STATUS 0x0000000c 4185#define BNX2_LINK_STATUS 0x0000000c
4133 4186
4134#define BNX2_DRV_PULSE_MB 0x00000010 4187#define BNX2_DRV_PULSE_MB 0x00000010
4135#define BNX2_DRV_PULSE_SEQ_MASK 0x0000ffff 4188#define BNX2_DRV_PULSE_SEQ_MASK 0x00007fff
4136 4189
4137/* Indicate to the firmware not to go into the 4190/* Indicate to the firmware not to go into the
4138 * OS absent when it is not getting driver pulse. 4191 * OS absent when it is not getting driver pulse.
4139 * This is used for debugging. */ 4192 * This is used for debugging. */
4140#define BNX2_DRV_MSG_DATA_PULSE_CODE_ALWAYS_ALIVE 0x00010000 4193#define BNX2_DRV_MSG_DATA_PULSE_CODE_ALWAYS_ALIVE 0x00080000
4141 4194
4142#define BNX2_DEV_INFO_SIGNATURE 0x00000020 4195#define BNX2_DEV_INFO_SIGNATURE 0x00000020
4143#define BNX2_DEV_INFO_SIGNATURE_MAGIC 0x44564900 4196#define BNX2_DEV_INFO_SIGNATURE_MAGIC 0x44564900
@@ -4160,6 +4213,8 @@ struct fw_info {
4160#define BNX2_SHARED_HW_CFG_DESIGN_LOM 0x1 4213#define BNX2_SHARED_HW_CFG_DESIGN_LOM 0x1
4161#define BNX2_SHARED_HW_CFG_PHY_COPPER 0 4214#define BNX2_SHARED_HW_CFG_PHY_COPPER 0
4162#define BNX2_SHARED_HW_CFG_PHY_FIBER 0x2 4215#define BNX2_SHARED_HW_CFG_PHY_FIBER 0x2
4216#define BNX2_SHARED_HW_CFG_PHY_2_5G 0x20
4217#define BNX2_SHARED_HW_CFG_PHY_BACKPLANE 0x40
4163#define BNX2_SHARED_HW_CFG_LED_MODE_SHIFT_BITS 8 4218#define BNX2_SHARED_HW_CFG_LED_MODE_SHIFT_BITS 8
4164#define BNX2_SHARED_HW_CFG_LED_MODE_MASK 0x300 4219#define BNX2_SHARED_HW_CFG_LED_MODE_MASK 0x300
4165#define BNX2_SHARED_HW_CFG_LED_MODE_MAC 0 4220#define BNX2_SHARED_HW_CFG_LED_MODE_MAC 0
@@ -4173,9 +4228,11 @@ struct fw_info {
4173 4228
4174#define BNX2_PORT_HW_CFG_MAC_LOWER 0x00000054 4229#define BNX2_PORT_HW_CFG_MAC_LOWER 0x00000054
4175#define BNX2_PORT_HW_CFG_CONFIG 0x00000058 4230#define BNX2_PORT_HW_CFG_CONFIG 0x00000058
4231#define BNX2_PORT_HW_CFG_CFG_TXCTL3_MASK 0x0000ffff
4176#define BNX2_PORT_HW_CFG_CFG_DFLT_LINK_MASK 0x001f0000 4232#define BNX2_PORT_HW_CFG_CFG_DFLT_LINK_MASK 0x001f0000
4177#define BNX2_PORT_HW_CFG_CFG_DFLT_LINK_AN 0x00000000 4233#define BNX2_PORT_HW_CFG_CFG_DFLT_LINK_AN 0x00000000
4178#define BNX2_PORT_HW_CFG_CFG_DFLT_LINK_1G 0x00030000 4234#define BNX2_PORT_HW_CFG_CFG_DFLT_LINK_1G 0x00030000
4235#define BNX2_PORT_HW_CFG_CFG_DFLT_LINK_2_5G 0x00040000
4179 4236
4180#define BNX2_PORT_HW_CFG_IMD_MAC_A_UPPER 0x00000068 4237#define BNX2_PORT_HW_CFG_IMD_MAC_A_UPPER 0x00000068
4181#define BNX2_PORT_HW_CFG_IMD_MAC_A_LOWER 0x0000006c 4238#define BNX2_PORT_HW_CFG_IMD_MAC_A_LOWER 0x0000006c