X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Fbnx2.h;h=9f691cbd666b4d6984423e2d5e07a50f1c4a60ad;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=b87925f6a2283582b19a57fcb4e3b4fcece0b927;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index b87925f6a..9f691cbd6 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h @@ -13,6 +13,45 @@ #ifndef BNX2_H #define BNX2_H +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef NETIF_F_HW_VLAN_TX +#include +#define BCM_VLAN 1 +#endif +#ifdef NETIF_F_TSO +#include +#include +#include +#define BCM_TSO 1 +#endif +#include +#include +#include + /* Hardware data structures and register definitions automatically * generated from RTL code. Do not modify. */ @@ -3753,10 +3792,8 @@ struct l2_fhdr { #define TX_DESC_CNT (BCM_PAGE_SIZE / sizeof(struct tx_bd)) #define MAX_TX_DESC_CNT (TX_DESC_CNT - 1) -#define MAX_RX_RINGS 4 #define RX_DESC_CNT (BCM_PAGE_SIZE / sizeof(struct rx_bd)) #define MAX_RX_DESC_CNT (RX_DESC_CNT - 1) -#define MAX_TOTAL_RX_DESC_CNT (MAX_RX_DESC_CNT * MAX_RX_RINGS) #define NEXT_TX_BD(x) (((x) & (MAX_TX_DESC_CNT - 1)) == \ (MAX_TX_DESC_CNT - 1)) ? \ @@ -3768,10 +3805,8 @@ struct l2_fhdr { (MAX_RX_DESC_CNT - 1)) ? \ (x) + 2 : (x) + 1 -#define RX_RING_IDX(x) ((x) & bp->rx_max_ring_idx) +#define RX_RING_IDX(x) ((x) & MAX_RX_DESC_CNT) -#define RX_RING(x) (((x) & ~MAX_RX_DESC_CNT) >> 8) -#define RX_IDX(x) ((x) & MAX_RX_DESC_CNT) /* Context size. */ #define CTX_SHIFT 7 @@ -3868,26 +3903,15 @@ struct bnx2 { struct status_block *status_blk; u32 last_status_idx; - u32 flags; -#define PCIX_FLAG 1 -#define PCI_32BIT_FLAG 2 -#define ONE_TDMA_FLAG 4 /* no longer used */ -#define NO_WOL_FLAG 8 -#define USING_DAC_FLAG 0x10 -#define USING_MSI_FLAG 0x20 -#define ASF_ENABLE_FLAG 0x40 - - /* Put tx producer and consumer fields in separate cache lines. */ + struct tx_bd *tx_desc_ring; + struct sw_bd *tx_buf_ring; + u32 tx_prod_bseq; + u16 tx_prod; + u16 tx_cons; + int tx_ring_size; - u32 tx_prod_bseq __attribute__((aligned(L1_CACHE_BYTES))); - u16 tx_prod; - - struct tx_bd *tx_desc_ring; - struct sw_bd *tx_buf_ring; - int tx_ring_size; - - u16 tx_cons __attribute__((aligned(L1_CACHE_BYTES))); - u16 hw_tx_cons; + u16 hw_tx_cons; + u16 hw_rx_cons; #ifdef BCM_VLAN struct vlan_group *vlgrp; @@ -3896,23 +3920,19 @@ struct bnx2 { u32 rx_offset; u32 rx_buf_use_size; /* useable size */ u32 rx_buf_size; /* with alignment */ - u32 rx_max_ring_idx; - + struct rx_bd *rx_desc_ring; + struct sw_bd *rx_buf_ring; u32 rx_prod_bseq; u16 rx_prod; u16 rx_cons; - u16 hw_rx_cons; u32 rx_csum; - struct sw_bd *rx_buf_ring; - struct rx_bd *rx_desc_ring[MAX_RX_RINGS]; - /* Only used to synchronize netif_stop_queue/wake_queue when tx */ /* ring is full */ spinlock_t tx_lock; - /* End of fields used in the performance code paths. */ + /* End of fileds used in the performance code paths. */ char *name; @@ -3925,6 +3945,15 @@ struct bnx2 { /* Used to synchronize phy accesses. */ spinlock_t phy_lock; + u32 flags; +#define PCIX_FLAG 1 +#define PCI_32BIT_FLAG 2 +#define ONE_TDMA_FLAG 4 /* no longer used */ +#define NO_WOL_FLAG 8 +#define USING_DAC_FLAG 0x10 +#define USING_MSI_FLAG 0x20 +#define ASF_ENABLE_FLAG 0x40 + u32 phy_flags; #define PHY_SERDES_FLAG 1 #define PHY_CRC_FIX_FLAG 2 @@ -3975,9 +4004,8 @@ struct bnx2 { dma_addr_t tx_desc_mapping; - int rx_max_ring; int rx_ring_size; - dma_addr_t rx_desc_mapping[MAX_RX_RINGS]; + dma_addr_t rx_desc_mapping; u16 tx_quick_cons_trip; u16 tx_quick_cons_trip_int; @@ -4001,7 +4029,6 @@ struct bnx2 { struct statistics_block *stats_blk; dma_addr_t stats_blk_mapping; - u32 hc_cmd; u32 rx_mode; u16 req_line_speed; @@ -4046,8 +4073,6 @@ struct bnx2 { struct flash_spec *flash_info; u32 flash_size; - - int status_stats_size; }; static u32 bnx2_reg_rd_ind(struct bnx2 *bp, u32 offset);