diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-11-19 07:00:21 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-19 20:21:25 +0100 |
commit | 909a85834d4e082501c26dd745b7caacf4eb1db3 (patch) | |
tree | 5f92556445c6cea1485262d02658e11a3a3a7ff4 /drivers/vhost/tcm_vhost.c | |
parent | netfilter: Remove the spurious \ in __ip_vs_lblc_init (diff) | |
download | linux-909a85834d4e082501c26dd745b7caacf4eb1db3.tar.xz linux-909a85834d4e082501c26dd745b7caacf4eb1db3.zip |
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>
Diffstat (limited to 'drivers/vhost/tcm_vhost.c')
0 files changed, 0 insertions, 0 deletions