summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cadence/macb.h
diff options
context:
space:
mode:
authorNicolas Ferre <nicolas.ferre@atmel.com>2012-10-31 06:04:57 +0000
committerDavid S. Miller <davem@davemloft.net>2012-11-01 11:45:58 -0400
commite86cd53afc5907f7c221b709916e2dd354e14691 (patch)
tree9c07152729ebed99f79b910102e39113c0323ea5 /drivers/net/ethernet/cadence/macb.h
parentd1d1b53d9d28c8e44a72fadae491702b36e2e1fb (diff)
downloadblackbird-obmc-linux-e86cd53afc5907f7c221b709916e2dd354e14691.tar.gz
blackbird-obmc-linux-e86cd53afc5907f7c221b709916e2dd354e14691.zip
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>
Diffstat (limited to 'drivers/net/ethernet/cadence/macb.h')
-rw-r--r--drivers/net/ethernet/cadence/macb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h
index 232dca6b5839..4235ab871ab4 100644
--- a/drivers/net/ethernet/cadence/macb.h
+++ b/drivers/net/ethernet/cadence/macb.h
@@ -538,6 +538,7 @@ struct macb {
struct clk *hclk;
struct net_device *dev;
struct napi_struct napi;
+ struct work_struct tx_error_task;
struct net_device_stats stats;
union {
struct macb_stats macb;
OpenPOWER on IntegriCloud