diff options
author | Olof Johansson <olof@lixom.net> | 2007-08-22 10:13:11 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:50:58 -0400 |
commit | 021fa22e01d3d0425d3d15df48f523b69a3a11c4 (patch) | |
tree | 6526993ff713b963d5c95acc9775f49dd135ff41 /drivers/net/pasemi_mac.h | |
parent | 02df6cfa09c2ccebe685bfd54a708e1f50b00a81 (diff) |
pasemi_mac: Fix TX ring wrap checking
The old logic didn't detect full (tx) ring cases properly, causing
overruns and general badness. Clean it up a bit and abstract out the
ring size checks, always making sure to leave 1 slot open.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/pasemi_mac.h')
-rw-r--r-- | drivers/net/pasemi_mac.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/pasemi_mac.h b/drivers/net/pasemi_mac.h index fbbc17a31db7..c5b0adbc182e 100644 --- a/drivers/net/pasemi_mac.h +++ b/drivers/net/pasemi_mac.h | |||
@@ -31,7 +31,7 @@ struct pasemi_mac_txring { | |||
31 | struct pas_dma_xct_descr *desc; | 31 | struct pas_dma_xct_descr *desc; |
32 | dma_addr_t dma; | 32 | dma_addr_t dma; |
33 | unsigned int size; | 33 | unsigned int size; |
34 | unsigned int next_to_use; | 34 | unsigned int next_to_fill; |
35 | unsigned int next_to_clean; | 35 | unsigned int next_to_clean; |
36 | struct pasemi_mac_buffer *desc_info; | 36 | struct pasemi_mac_buffer *desc_info; |
37 | char irq_name[10]; /* "eth%d tx" */ | 37 | char irq_name[10]; /* "eth%d tx" */ |