From: Nicolas Ferre Date: Mon, 19 Nov 2012 06:00:21 +0000 (+0000) Subject: net/macb: move to circ_buf macros and fix initial condition X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~45^2~269 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=909a85834d4e082501c26dd745b7caacf4eb1db3;p=pandora-kernel.git 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 Signed-off-by: Nicolas Ferre Tested-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: David S. Miller --- Reading git-diff-tree failed