diff options
Diffstat (limited to 'drivers/net/bnx2.h')
-rw-r--r-- | drivers/net/bnx2.h | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index d8e034700c36..3aa0364942e2 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h | |||
@@ -348,6 +348,12 @@ struct l2_fhdr { | |||
348 | #define BNX2_L2CTX_BD_PRE_READ 0x00000000 | 348 | #define BNX2_L2CTX_BD_PRE_READ 0x00000000 |
349 | #define BNX2_L2CTX_CTX_SIZE 0x00000000 | 349 | #define BNX2_L2CTX_CTX_SIZE 0x00000000 |
350 | #define BNX2_L2CTX_CTX_TYPE 0x00000000 | 350 | #define BNX2_L2CTX_CTX_TYPE 0x00000000 |
351 | #define BNX2_L2CTX_LO_WATER_MARK_DEFAULT 32 | ||
352 | #define BNX2_L2CTX_LO_WATER_MARK_SCALE 4 | ||
353 | #define BNX2_L2CTX_LO_WATER_MARK_DIS 0 | ||
354 | #define BNX2_L2CTX_HI_WATER_MARK_SHIFT 4 | ||
355 | #define BNX2_L2CTX_HI_WATER_MARK_SCALE 16 | ||
356 | #define BNX2_L2CTX_WATER_MARKS_MSK 0x000000ff | ||
351 | #define BNX2_L2CTX_CTX_TYPE_SIZE_L2 ((0x20/20)<<16) | 357 | #define BNX2_L2CTX_CTX_TYPE_SIZE_L2 ((0x20/20)<<16) |
352 | #define BNX2_L2CTX_CTX_TYPE_CTX_BD_CHN_TYPE (0xf<<28) | 358 | #define BNX2_L2CTX_CTX_TYPE_CTX_BD_CHN_TYPE (0xf<<28) |
353 | #define BNX2_L2CTX_CTX_TYPE_CTX_BD_CHN_TYPE_UNDEFINED (0<<28) | 359 | #define BNX2_L2CTX_CTX_TYPE_CTX_BD_CHN_TYPE_UNDEFINED (0<<28) |
@@ -4494,6 +4500,9 @@ struct l2_fhdr { | |||
4494 | #define BNX2_MQ_MAP_L2_3_ENA (0x1L<<31) | 4500 | #define BNX2_MQ_MAP_L2_3_ENA (0x1L<<31) |
4495 | #define BNX2_MQ_MAP_L2_3_DEFAULT 0x82004646 | 4501 | #define BNX2_MQ_MAP_L2_3_DEFAULT 0x82004646 |
4496 | 4502 | ||
4503 | #define BNX2_MQ_MAP_L2_5 0x00003d34 | ||
4504 | #define BNX2_MQ_MAP_L2_5_ARM (0x3L<<26) | ||
4505 | |||
4497 | /* | 4506 | /* |
4498 | * tsch_reg definition | 4507 | * tsch_reg definition |
4499 | * offset: 0x4c00 | 4508 | * offset: 0x4c00 |
@@ -5510,6 +5519,15 @@ struct l2_fhdr { | |||
5510 | #define BNX2_HC_PERIODIC_TICKS_8_HC_PERIODIC_TICKS (0xffffL<<0) | 5519 | #define BNX2_HC_PERIODIC_TICKS_8_HC_PERIODIC_TICKS (0xffffL<<0) |
5511 | #define BNX2_HC_PERIODIC_TICKS_8_HC_INT_PERIODIC_TICKS (0xffffL<<16) | 5520 | #define BNX2_HC_PERIODIC_TICKS_8_HC_INT_PERIODIC_TICKS (0xffffL<<16) |
5512 | 5521 | ||
5522 | #define BNX2_HC_SB_CONFIG_SIZE (BNX2_HC_SB_CONFIG_2 - BNX2_HC_SB_CONFIG_1) | ||
5523 | #define BNX2_HC_COMP_PROD_TRIP_OFF (BNX2_HC_COMP_PROD_TRIP_1 - \ | ||
5524 | BNX2_HC_SB_CONFIG_1) | ||
5525 | #define BNX2_HC_COM_TICKS_OFF (BNX2_HC_COM_TICKS_1 - BNX2_HC_SB_CONFIG_1) | ||
5526 | #define BNX2_HC_CMD_TICKS_OFF (BNX2_HC_CMD_TICKS_1 - BNX2_HC_SB_CONFIG_1) | ||
5527 | #define BNX2_HC_TX_QUICK_CONS_TRIP_OFF (BNX2_HC_TX_QUICK_CONS_TRIP_1 - \ | ||
5528 | BNX2_HC_SB_CONFIG_1) | ||
5529 | #define BNX2_HC_TX_TICKS_OFF (BNX2_HC_TX_TICKS_1 - BNX2_HC_SB_CONFIG_1) | ||
5530 | |||
5513 | 5531 | ||
5514 | /* | 5532 | /* |
5515 | * txp_reg definition | 5533 | * txp_reg definition |
@@ -6346,11 +6364,12 @@ struct l2_fhdr { | |||
6346 | #define MII_BNX2_DSP_EXPAND_REG 0x0f00 | 6364 | #define MII_BNX2_DSP_EXPAND_REG 0x0f00 |
6347 | #define MII_EXPAND_REG1 (MII_BNX2_DSP_EXPAND_REG | 1) | 6365 | #define MII_EXPAND_REG1 (MII_BNX2_DSP_EXPAND_REG | 1) |
6348 | #define MII_EXPAND_REG1_RUDI_C 0x20 | 6366 | #define MII_EXPAND_REG1_RUDI_C 0x20 |
6349 | #define MII_EXPAND_SERDES_CTL (MII_BNX2_DSP_EXPAND_REG | 2) | 6367 | #define MII_EXPAND_SERDES_CTL (MII_BNX2_DSP_EXPAND_REG | 3) |
6350 | 6368 | ||
6351 | #define MII_BNX2_MISC_SHADOW 0x1c | 6369 | #define MII_BNX2_MISC_SHADOW 0x1c |
6352 | #define MISC_SHDW_AN_DBG 0x6800 | 6370 | #define MISC_SHDW_AN_DBG 0x6800 |
6353 | #define MISC_SHDW_AN_DBG_NOSYNC 0x0002 | 6371 | #define MISC_SHDW_AN_DBG_NOSYNC 0x0002 |
6372 | #define MISC_SHDW_AN_DBG_RUDI_INVALID 0x0100 | ||
6354 | #define MISC_SHDW_MODE_CTL 0x7c00 | 6373 | #define MISC_SHDW_MODE_CTL 0x7c00 |
6355 | #define MISC_SHDW_MODE_CTL_SIG_DET 0x0010 | 6374 | #define MISC_SHDW_MODE_CTL_SIG_DET 0x0010 |
6356 | 6375 | ||
@@ -6395,7 +6414,7 @@ struct l2_fhdr { | |||
6395 | 6414 | ||
6396 | #define RX_COPY_THRESH 128 | 6415 | #define RX_COPY_THRESH 128 |
6397 | 6416 | ||
6398 | #define BNX2_MISC_ENABLE_DEFAULT 0x7ffffff | 6417 | #define BNX2_MISC_ENABLE_DEFAULT 0x17ffffff |
6399 | 6418 | ||
6400 | #define DMA_READ_CHANS 5 | 6419 | #define DMA_READ_CHANS 5 |
6401 | #define DMA_WRITE_CHANS 3 | 6420 | #define DMA_WRITE_CHANS 3 |
@@ -6795,9 +6814,6 @@ struct bnx2 { | |||
6795 | int irq_nvecs; | 6814 | int irq_nvecs; |
6796 | }; | 6815 | }; |
6797 | 6816 | ||
6798 | static u32 bnx2_reg_rd_ind(struct bnx2 *bp, u32 offset); | ||
6799 | static void bnx2_reg_wr_ind(struct bnx2 *bp, u32 offset, u32 val); | ||
6800 | |||
6801 | #define REG_RD(bp, offset) \ | 6817 | #define REG_RD(bp, offset) \ |
6802 | readl(bp->regview + offset) | 6818 | readl(bp->regview + offset) |
6803 | 6819 | ||
@@ -6807,19 +6823,6 @@ static void bnx2_reg_wr_ind(struct bnx2 *bp, u32 offset, u32 val); | |||
6807 | #define REG_WR16(bp, offset, val) \ | 6823 | #define REG_WR16(bp, offset, val) \ |
6808 | writew(val, bp->regview + offset) | 6824 | writew(val, bp->regview + offset) |
6809 | 6825 | ||
6810 | #define REG_RD_IND(bp, offset) \ | ||
6811 | bnx2_reg_rd_ind(bp, offset) | ||
6812 | |||
6813 | #define REG_WR_IND(bp, offset, val) \ | ||
6814 | bnx2_reg_wr_ind(bp, offset, val) | ||
6815 | |||
6816 | /* Indirect context access. Unlike the MBQ_WR, these macros will not | ||
6817 | * trigger a chip event. */ | ||
6818 | static void bnx2_ctx_wr(struct bnx2 *bp, u32 cid_addr, u32 offset, u32 val); | ||
6819 | |||
6820 | #define CTX_WR(bp, cid_addr, offset, val) \ | ||
6821 | bnx2_ctx_wr(bp, cid_addr, offset, val) | ||
6822 | |||
6823 | struct cpu_reg { | 6826 | struct cpu_reg { |
6824 | u32 mode; | 6827 | u32 mode; |
6825 | u32 mode_value_halt; | 6828 | u32 mode_value_halt; |