net: ethernet: ti: cpsw: wake tx queues on ndo_tx_timeout
authorGrygorii Strashko <grygorii.strashko@ti.com>
Fri, 31 Mar 2017 23:41:23 +0000 (18:41 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Apr 2017 02:42:44 +0000 (19:42 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw.c

index 9f3d9c67e3fe0f50b2d1119e74b7eac4b93e8bae..58cdc066ef2c4eca7d20a1ae99ad05ea702562f7 100644 (file)
@@ -1817,6 +1817,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)