linux/drivers/net/ethernet/cadence
Nicolas Ferre 909a85834d net/macb: move to circ_buf macros and fix initial condition
Move to circular buffers management macro and correct an error
with circular buffer initial condition.

Without this patch, the macb_tx_ring_avail() function was
not reporting the proper ring availability at startup:
macb macb: eth0: BUG! Tx Ring full when queue awake!
macb macb: eth0: tx_head = 0, tx_tail = 0
And hanginig forever...

I remove the macb_tx_ring_avail() function and use the
proven macros from circ_buf.h. CIRC_CNT() is used in the
"consumer" part of the driver: macb_tx_interrupt() to match
advice from Documentation/circular-buffers.txt.

Reported-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-19 14:21:25 -05:00
..
at91_ether.c net/at91_ether: fix comment and style issues 2012-11-07 17:44:38 -05:00
Kconfig net/cadence: depend on HAS_IOMEM 2012-10-31 14:00:15 -04:00
macb.c net/macb: move to circ_buf macros and fix initial condition 2012-11-19 14:21:25 -05:00
macb.h net/macb: clear unused address register 2012-11-14 18:51:03 -05:00
Makefile net/at91_ether: select MACB in Kconfig 2012-10-23 02:40:09 -04:00