diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-21 14:05:45 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-21 14:05:45 -0500 |
commit | d04cdb64212eb5ae6a98026a97dda626e40e8e9a (patch) | |
tree | b6a7dbb21ccfceb915844e9a330b3d3dfcaf3c5b /drivers/net/bnx2.h | |
parent | 2f8600dff2b140096a7df781884e918a16aa90e0 (diff) | |
parent | ec1248e70edc5cf7b485efcc7b41e44e10f422e5 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'drivers/net/bnx2.h')
-rw-r--r-- | drivers/net/bnx2.h | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index 9f691cbd666b..fd4b7f2eb477 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
24 | #include <linux/ioport.h> | 24 | #include <linux/ioport.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/vmalloc.h> | ||
26 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
27 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
28 | #include <linux/init.h> | 29 | #include <linux/init.h> |
@@ -3792,8 +3793,10 @@ struct l2_fhdr { | |||
3792 | #define TX_DESC_CNT (BCM_PAGE_SIZE / sizeof(struct tx_bd)) | 3793 | #define TX_DESC_CNT (BCM_PAGE_SIZE / sizeof(struct tx_bd)) |
3793 | #define MAX_TX_DESC_CNT (TX_DESC_CNT - 1) | 3794 | #define MAX_TX_DESC_CNT (TX_DESC_CNT - 1) |
3794 | 3795 | ||
3796 | #define MAX_RX_RINGS 4 | ||
3795 | #define RX_DESC_CNT (BCM_PAGE_SIZE / sizeof(struct rx_bd)) | 3797 | #define RX_DESC_CNT (BCM_PAGE_SIZE / sizeof(struct rx_bd)) |
3796 | #define MAX_RX_DESC_CNT (RX_DESC_CNT - 1) | 3798 | #define MAX_RX_DESC_CNT (RX_DESC_CNT - 1) |
3799 | #define MAX_TOTAL_RX_DESC_CNT (MAX_RX_DESC_CNT * MAX_RX_RINGS) | ||
3797 | 3800 | ||
3798 | #define NEXT_TX_BD(x) (((x) & (MAX_TX_DESC_CNT - 1)) == \ | 3801 | #define NEXT_TX_BD(x) (((x) & (MAX_TX_DESC_CNT - 1)) == \ |
3799 | (MAX_TX_DESC_CNT - 1)) ? \ | 3802 | (MAX_TX_DESC_CNT - 1)) ? \ |
@@ -3805,8 +3808,10 @@ struct l2_fhdr { | |||
3805 | (MAX_RX_DESC_CNT - 1)) ? \ | 3808 | (MAX_RX_DESC_CNT - 1)) ? \ |
3806 | (x) + 2 : (x) + 1 | 3809 | (x) + 2 : (x) + 1 |
3807 | 3810 | ||
3808 | #define RX_RING_IDX(x) ((x) & MAX_RX_DESC_CNT) | 3811 | #define RX_RING_IDX(x) ((x) & bp->rx_max_ring_idx) |
3809 | 3812 | ||
3813 | #define RX_RING(x) (((x) & ~MAX_RX_DESC_CNT) >> 8) | ||
3814 | #define RX_IDX(x) ((x) & MAX_RX_DESC_CNT) | ||
3810 | 3815 | ||
3811 | /* Context size. */ | 3816 | /* Context size. */ |
3812 | #define CTX_SHIFT 7 | 3817 | #define CTX_SHIFT 7 |
@@ -3903,6 +3908,15 @@ struct bnx2 { | |||
3903 | struct status_block *status_blk; | 3908 | struct status_block *status_blk; |
3904 | u32 last_status_idx; | 3909 | u32 last_status_idx; |
3905 | 3910 | ||
3911 | u32 flags; | ||
3912 | #define PCIX_FLAG 1 | ||
3913 | #define PCI_32BIT_FLAG 2 | ||
3914 | #define ONE_TDMA_FLAG 4 /* no longer used */ | ||
3915 | #define NO_WOL_FLAG 8 | ||
3916 | #define USING_DAC_FLAG 0x10 | ||
3917 | #define USING_MSI_FLAG 0x20 | ||
3918 | #define ASF_ENABLE_FLAG 0x40 | ||
3919 | |||
3906 | struct tx_bd *tx_desc_ring; | 3920 | struct tx_bd *tx_desc_ring; |
3907 | struct sw_bd *tx_buf_ring; | 3921 | struct sw_bd *tx_buf_ring; |
3908 | u32 tx_prod_bseq; | 3922 | u32 tx_prod_bseq; |
@@ -3920,19 +3934,22 @@ struct bnx2 { | |||
3920 | u32 rx_offset; | 3934 | u32 rx_offset; |
3921 | u32 rx_buf_use_size; /* useable size */ | 3935 | u32 rx_buf_use_size; /* useable size */ |
3922 | u32 rx_buf_size; /* with alignment */ | 3936 | u32 rx_buf_size; /* with alignment */ |
3923 | struct rx_bd *rx_desc_ring; | 3937 | u32 rx_max_ring_idx; |
3924 | struct sw_bd *rx_buf_ring; | 3938 | |
3925 | u32 rx_prod_bseq; | 3939 | u32 rx_prod_bseq; |
3926 | u16 rx_prod; | 3940 | u16 rx_prod; |
3927 | u16 rx_cons; | 3941 | u16 rx_cons; |
3928 | 3942 | ||
3929 | u32 rx_csum; | 3943 | u32 rx_csum; |
3930 | 3944 | ||
3945 | struct sw_bd *rx_buf_ring; | ||
3946 | struct rx_bd *rx_desc_ring[MAX_RX_RINGS]; | ||
3947 | |||
3931 | /* Only used to synchronize netif_stop_queue/wake_queue when tx */ | 3948 | /* Only used to synchronize netif_stop_queue/wake_queue when tx */ |
3932 | /* ring is full */ | 3949 | /* ring is full */ |
3933 | spinlock_t tx_lock; | 3950 | spinlock_t tx_lock; |
3934 | 3951 | ||
3935 | /* End of fileds used in the performance code paths. */ | 3952 | /* End of fields used in the performance code paths. */ |
3936 | 3953 | ||
3937 | char *name; | 3954 | char *name; |
3938 | 3955 | ||
@@ -3945,15 +3962,6 @@ struct bnx2 { | |||
3945 | /* Used to synchronize phy accesses. */ | 3962 | /* Used to synchronize phy accesses. */ |
3946 | spinlock_t phy_lock; | 3963 | spinlock_t phy_lock; |
3947 | 3964 | ||
3948 | u32 flags; | ||
3949 | #define PCIX_FLAG 1 | ||
3950 | #define PCI_32BIT_FLAG 2 | ||
3951 | #define ONE_TDMA_FLAG 4 /* no longer used */ | ||
3952 | #define NO_WOL_FLAG 8 | ||
3953 | #define USING_DAC_FLAG 0x10 | ||
3954 | #define USING_MSI_FLAG 0x20 | ||
3955 | #define ASF_ENABLE_FLAG 0x40 | ||
3956 | |||
3957 | u32 phy_flags; | 3965 | u32 phy_flags; |
3958 | #define PHY_SERDES_FLAG 1 | 3966 | #define PHY_SERDES_FLAG 1 |
3959 | #define PHY_CRC_FIX_FLAG 2 | 3967 | #define PHY_CRC_FIX_FLAG 2 |
@@ -4004,8 +4012,9 @@ struct bnx2 { | |||
4004 | dma_addr_t tx_desc_mapping; | 4012 | dma_addr_t tx_desc_mapping; |
4005 | 4013 | ||
4006 | 4014 | ||
4015 | int rx_max_ring; | ||
4007 | int rx_ring_size; | 4016 | int rx_ring_size; |
4008 | dma_addr_t rx_desc_mapping; | 4017 | dma_addr_t rx_desc_mapping[MAX_RX_RINGS]; |
4009 | 4018 | ||
4010 | u16 tx_quick_cons_trip; | 4019 | u16 tx_quick_cons_trip; |
4011 | u16 tx_quick_cons_trip_int; | 4020 | u16 tx_quick_cons_trip_int; |