bnx2: Update firmware to 6.0.x.
[linux-2.6.git] / drivers / net / bnx2.h
index 026ed1c..efdfbc2 100644 (file)
@@ -295,6 +295,9 @@ struct l2_fhdr {
                #define L2_FHDR_ERRORS_TCP_XSUM         (1<<28)
                #define L2_FHDR_ERRORS_UDP_XSUM         (1<<31)
 
+               #define L2_FHDR_STATUS_USE_RXHASH       \
+                       (L2_FHDR_STATUS_TCP_SEGMENT | L2_FHDR_STATUS_RSS_HASH)
+
        u32 l2_fhdr_hash;
 #if defined(__BIG_ENDIAN)
        u16 l2_fhdr_pkt_len;
@@ -349,18 +352,19 @@ struct l2_fhdr {
 #define BNX2_L2CTX_BD_PRE_READ                         0x00000000
 #define BNX2_L2CTX_CTX_SIZE                            0x00000000
 #define BNX2_L2CTX_CTX_TYPE                            0x00000000
-#define BNX2_L2CTX_LO_WATER_MARK_DEFAULT                32
-#define BNX2_L2CTX_LO_WATER_MARK_SCALE                  4
-#define BNX2_L2CTX_LO_WATER_MARK_DIS                    0
-#define BNX2_L2CTX_HI_WATER_MARK_SHIFT                  4
-#define BNX2_L2CTX_HI_WATER_MARK_SCALE                  16
-#define BNX2_L2CTX_WATER_MARKS_MSK                      0x000000ff
+#define BNX2_L2CTX_FLOW_CTRL_ENABLE                     0x000000ff
 #define BNX2_L2CTX_CTX_TYPE_SIZE_L2                     ((0x20/20)<<16)
 #define BNX2_L2CTX_CTX_TYPE_CTX_BD_CHN_TYPE             (0xf<<28)
 #define BNX2_L2CTX_CTX_TYPE_CTX_BD_CHN_TYPE_UNDEFINED   (0<<28)
 #define BNX2_L2CTX_CTX_TYPE_CTX_BD_CHN_TYPE_VALUE       (1<<28)
 
 #define BNX2_L2CTX_HOST_BDIDX                          0x00000004
+#define BNX2_L2CTX_L5_STATUSB_NUM_SHIFT                         16
+#define BNX2_L2CTX_L2_STATUSB_NUM_SHIFT                         24
+#define BNX2_L2CTX_L5_STATUSB_NUM(sb_id)               \
+       (((sb_id) > 0) ? (((sb_id) + 7) << BNX2_L2CTX_L5_STATUSB_NUM_SHIFT) : 0)
+#define BNX2_L2CTX_L2_STATUSB_NUM(sb_id)               \
+       (((sb_id) > 0) ? (((sb_id) + 7) << BNX2_L2CTX_L2_STATUSB_NUM_SHIFT) : 0)
 #define BNX2_L2CTX_HOST_BSEQ                           0x00000008
 #define BNX2_L2CTX_NX_BSEQ                             0x0000000c
 #define BNX2_L2CTX_NX_BDHADDR_HI                       0x00000010
@@ -4176,6 +4180,15 @@ struct l2_fhdr {
 #define BNX2_RLUP_RSS_CONFIG_IPV6_RSS_TYPE_IP_ONLY_XI   (2L<<2)
 #define BNX2_RLUP_RSS_CONFIG_IPV6_RSS_TYPE_RES_XI       (3L<<2)
 
+#define BNX2_RLUP_RSS_COMMAND                          0x00002048
+#define BNX2_RLUP_RSS_COMMAND_RSS_IND_TABLE_ADDR        (0xfUL<<0)
+#define BNX2_RLUP_RSS_COMMAND_RSS_WRITE_MASK            (0xffUL<<4)
+#define BNX2_RLUP_RSS_COMMAND_WRITE                     (1UL<<12)
+#define BNX2_RLUP_RSS_COMMAND_READ                      (1UL<<13)
+#define BNX2_RLUP_RSS_COMMAND_HASH_MASK                         (0x7UL<<14)
+
+#define BNX2_RLUP_RSS_DATA                             0x0000204c
+
 
 /*
  *  rbuf_reg definition
@@ -5900,6 +5913,7 @@ struct l2_fhdr {
 #define BNX2_RXP_FTQ_CTL_CUR_DEPTH                      (0x3ffL<<22)
 
 #define BNX2_RXP_SCRATCH                               0x000e0000
+#define BNX2_RXP_SCRATCH_RXP_FLOOD                      0x000e0024
 #define BNX2_RXP_SCRATCH_RSS_TBL_SZ                     0x000e0038
 #define BNX2_RXP_SCRATCH_RSS_TBL                        0x000e003c
 #define BNX2_RXP_SCRATCH_RSS_TBL_MAX_ENTRIES            128
@@ -6067,6 +6081,7 @@ struct l2_fhdr {
 
 #define BNX2_COM_SCRATCH                               0x00120000
 
+#define BNX2_FW_RX_LOW_LATENCY                          0x00120058
 #define BNX2_FW_RX_DROP_COUNT                           0x00120084
 
 
@@ -6338,6 +6353,10 @@ struct l2_fhdr {
 
 #define BNX2_MCP_ROM                                   0x00150000
 #define BNX2_MCP_SCRATCH                               0x00160000
+#define BNX2_MCP_STATE_P1                               0x0016f9c8
+#define BNX2_MCP_STATE_P0                               0x0016fdc8
+#define BNX2_MCP_STATE_P1_5708                          0x001699c8
+#define BNX2_MCP_STATE_P0_5708                          0x00169dc8
 
 #define BNX2_SHM_HDR_SIGNATURE                         BNX2_MCP_SCRATCH
 #define BNX2_SHM_HDR_SIGNATURE_SIG_MASK                         0xffff0000
@@ -6542,16 +6561,18 @@ struct l2_fhdr {
 
 struct sw_bd {
        struct sk_buff          *skb;
-       DECLARE_PCI_UNMAP_ADDR(mapping)
+       struct l2_fhdr          *desc;
+       DEFINE_DMA_UNMAP_ADDR(mapping);
 };
 
 struct sw_pg {
        struct page             *page;
-       DECLARE_PCI_UNMAP_ADDR(mapping)
+       DEFINE_DMA_UNMAP_ADDR(mapping);
 };
 
 struct sw_tx_bd {
        struct sk_buff          *skb;
+       DEFINE_DMA_UNMAP_ADDR(mapping);
        unsigned short          is_gso;
        unsigned short          nr_frags;
 };
@@ -6621,9 +6642,12 @@ struct flash_spec {
 
 #define BNX2_MAX_MSIX_HW_VEC   9
 #define BNX2_MAX_MSIX_VEC      9
-#define BNX2_BASE_VEC          0
-#define BNX2_TX_VEC            1
-#define BNX2_TX_INT_NUM        (BNX2_TX_VEC << BNX2_PCICFG_INT_ACK_CMD_INT_NUM_SHIFT)
+#ifdef BCM_CNIC
+#define BNX2_MIN_MSIX_VEC      2
+#else
+#define BNX2_MIN_MSIX_VEC      1
+#endif
+
 
 struct bnx2_irq {
        irq_handler_t   handler;
@@ -6680,6 +6704,11 @@ struct bnx2_napi {
        u32                     last_status_idx;
        u32                     int_num;
 
+#ifdef BCM_CNIC
+       u32                     cnic_tag;
+       int                     cnic_present;
+#endif
+
        struct bnx2_rx_ring_info        rx_ring;
        struct bnx2_tx_ring_info        tx_ring;
 };
@@ -6709,6 +6738,7 @@ struct bnx2 {
                                         BNX2_FLAG_USING_MSIX)
 #define BNX2_FLAG_JUMBO_BROKEN         0x00000800
 #define BNX2_FLAG_CAN_KEEP_VLAN                0x00001000
+#define BNX2_FLAG_BROKEN_STATS         0x00002000
 
        struct bnx2_napi        bnx2_napi[BNX2_MAX_MSIX_VEC];
 
@@ -6729,6 +6759,11 @@ struct bnx2 {
        int             tx_ring_size;
        u32             tx_wake_thresh;
 
+#ifdef BCM_CNIC
+       struct cnic_ops         *cnic_ops;
+       void                    *cnic_data;
+#endif
+
        /* End of fields used in the performance code paths. */
 
        unsigned int            current_interval;
@@ -6830,6 +6865,7 @@ struct bnx2 {
        dma_addr_t              status_blk_mapping;
 
        struct statistics_block *stats_blk;
+       struct statistics_block *temp_stats_blk;
        dma_addr_t              stats_blk_mapping;
 
        int                     ctx_pages;
@@ -6874,7 +6910,7 @@ struct bnx2 {
        int                     pm_cap;
        int                     pcix_cap;
 
-       struct flash_spec       *flash_info;
+       const struct flash_spec *flash_info;
        u32                     flash_size;
 
        int                     status_stats_size;
@@ -6887,6 +6923,11 @@ struct bnx2 {
 
        u32                     idle_chk_status_idx;
 
+#ifdef BCM_CNIC
+       struct mutex            cnic_lock;
+       struct cnic_eth_dev     cnic_eth_dev;
+#endif
+
        const struct firmware   *mips_firmware;
        const struct firmware   *rv2p_firmware;
 };