]> git.baikalelectronics.ru Git - kernel.git/commit
net/macb: better manage tx errors
authorNicolas Ferre <nicolas.ferre@atmel.com>
Wed, 31 Oct 2012 06:04:57 +0000 (06:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Nov 2012 15:45:58 +0000 (11:45 -0400)
commitb16ffc34e2c59726c29f0c0ac1d2bad77adc3c9b
tree9c07152729ebed99f79b910102e39113c0323ea5
parent217788555acbbabfe62e02e9e0c7f011e4c18dbd
net/macb: better manage tx errors

Handle all TX errors, not only underruns. TX error management is
deferred to a dedicated workqueue.
Reinitialize the TX ring after treating all remaining frames, and
restart the controller when everything has been cleaned up properly.
Napi is not stopped during this task as the driver only handles
napi for RX for now.
With this sequence, we do not need a special check during the xmit
method as the packets will be caught by TX disable during workqueue
execution.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Tested-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb.c
drivers/net/ethernet/cadence/macb.h