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)
commite86cd53afc5907f7c221b709916e2dd354e14691
tree9c07152729ebed99f79b910102e39113c0323ea5
parentd1d1b53d9d28c8e44a72fadae491702b36e2e1fb
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