diff options
author | Michael Chan <mchan@broadcom.com> | 2005-08-25 18:36:58 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 19:10:38 -0400 |
commit | e89bbf1049aac3625fdafe3657ed8d7d5373d351 (patch) | |
tree | 15e0fc01d553ce5bc38de546d80f5f2e3736b0bf /drivers/net/bnx2.h | |
parent | cd339a0ed61097d92ce03b6d1042b1e4d58535e7 (diff) |
[BNX2]: remove atomics in tx
Remove atomic operations in the fast tx path. Expensive atomic
operations were used to keep track of the number of available tx
descriptors. The new code uses the difference between the consumer
and producer index to determine the number of free tx descriptors.
As suggested by Jeff Garzik, the name of the inline function is
changed to all lower case.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.h')
-rw-r--r-- | drivers/net/bnx2.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index e1fb099acbf2..9ad3f5740cd8 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h | |||
@@ -3841,12 +3841,12 @@ struct bnx2 { | |||
3841 | struct status_block *status_blk; | 3841 | struct status_block *status_blk; |
3842 | u32 last_status_idx; | 3842 | u32 last_status_idx; |
3843 | 3843 | ||
3844 | atomic_t tx_avail_bd; | ||
3845 | struct tx_bd *tx_desc_ring; | 3844 | struct tx_bd *tx_desc_ring; |
3846 | struct sw_bd *tx_buf_ring; | 3845 | struct sw_bd *tx_buf_ring; |
3847 | u32 tx_prod_bseq; | 3846 | u32 tx_prod_bseq; |
3848 | u16 tx_prod; | 3847 | u16 tx_prod; |
3849 | u16 tx_cons; | 3848 | u16 tx_cons; |
3849 | int tx_ring_size; | ||
3850 | 3850 | ||
3851 | #ifdef BCM_VLAN | 3851 | #ifdef BCM_VLAN |
3852 | struct vlan_group *vlgrp; | 3852 | struct vlan_group *vlgrp; |
@@ -3929,7 +3929,6 @@ struct bnx2 { | |||
3929 | u16 fw_wr_seq; | 3929 | u16 fw_wr_seq; |
3930 | u16 fw_drv_pulse_wr_seq; | 3930 | u16 fw_drv_pulse_wr_seq; |
3931 | 3931 | ||
3932 | int tx_ring_size; | ||
3933 | dma_addr_t tx_desc_mapping; | 3932 | dma_addr_t tx_desc_mapping; |
3934 | 3933 | ||
3935 | 3934 | ||