From 021fa22e01d3d0425d3d15df48f523b69a3a11c4 Mon Sep 17 00:00:00 2001 From: Olof Johansson Date: Wed, 22 Aug 2007 09:13:11 -0500 Subject: 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 Signed-off-by: Jeff Garzik --- drivers/net/pasemi_mac.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/pasemi_mac.h') 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 { struct pas_dma_xct_descr *desc; dma_addr_t dma; unsigned int size; - unsigned int next_to_use; + unsigned int next_to_fill; unsigned int next_to_clean; struct pasemi_mac_buffer *desc_info; char irq_name[10]; /* "eth%d tx" */ -- cgit v1.2.3-59-g8ed1b