diff mbox

net: ethernet: ti: cpsw: wake tx queues on ndo_tx_timeout

Message ID 20170331234123.15607-1-grygorii.strashko@ti.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Grygorii Strashko March 31, 2017, 11:41 p.m. UTC
In case, if TX watchdog is fired some or all netdev TX queues will be
stopped and as part of recovery it is required not only to drain and
reinitailize CPSW TX channeles, but also wake up stoppted TX queues what
doesn't happen now and netdevice will stop transmiting data until
reopenned.

Hence, add netif_tx_wake_all_queues() call in .ndo_tx_timeout() to complete
recovery and restore TX path.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 drivers/net/ethernet/ti/cpsw.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

David Miller April 3, 2017, 2:43 a.m. UTC | #1
From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: Fri, 31 Mar 2017 18:41:23 -0500

> In case, if TX watchdog is fired some or all netdev TX queues will be
> stopped and as part of recovery it is required not only to drain and
> reinitailize CPSW TX channeles, but also wake up stoppted TX queues what
> doesn't happen now and netdevice will stop transmiting data until
> reopenned.
> 
> Hence, add netif_tx_wake_all_queues() call in .ndo_tx_timeout() to complete
> recovery and restore TX path.
> 
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

Applied, thank you.
diff mbox

Patch

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 86d6f10..71fd4ef 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1819,6 +1819,8 @@  static void cpsw_ndo_tx_timeout(struct net_device *ndev)
 	}
 
 	cpsw_intr_enable(cpsw);
+	netif_trans_update(ndev);
+	netif_tx_wake_all_queues(ndev);
 }
 
 static int cpsw_ndo_set_mac_address(struct net_device *ndev, void *p)