Skip to content

Commit b59eabd

Browse files
emuslndavem330
authored andcommitted
ionic: tame the watchdog timer on reconfig
Even with moving netif_tx_disable() to an earlier point when taking down the queues for a reconfiguration, we still end up with the occasional netdev watchdog Tx Timeout complaint. The old method of using netif_trans_update() works fine for queue 0, but has no effect on the remaining queues. Using netif_device_detach() allows us to signal to the watchdog to ignore us for the moment. Fixes: beead69 ("ionic: Add the basic NDO callbacks for netdev support") Signed-off-by: Shannon Nelson <[email protected]> Acked-by: Jonathan Toppins <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ca88260 commit b59eabd

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

drivers/net/ethernet/pensando/ionic/ionic_lif.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,15 +1694,15 @@ static void ionic_stop_queues(struct ionic_lif *lif)
16941694
if (!test_and_clear_bit(IONIC_LIF_F_UP, lif->state))
16951695
return;
16961696

1697-
ionic_txrx_disable(lif);
16981697
netif_tx_disable(lif->netdev);
1698+
ionic_txrx_disable(lif);
16991699
}
17001700

17011701
int ionic_stop(struct net_device *netdev)
17021702
{
17031703
struct ionic_lif *lif = netdev_priv(netdev);
17041704

1705-
if (!netif_device_present(netdev))
1705+
if (test_bit(IONIC_LIF_F_FW_RESET, lif->state))
17061706
return 0;
17071707

17081708
ionic_stop_queues(lif);
@@ -1985,18 +1985,19 @@ int ionic_reset_queues(struct ionic_lif *lif)
19851985
bool running;
19861986
int err = 0;
19871987

1988-
/* Put off the next watchdog timeout */
1989-
netif_trans_update(lif->netdev);
1990-
19911988
err = ionic_wait_for_bit(lif, IONIC_LIF_F_QUEUE_RESET);
19921989
if (err)
19931990
return err;
19941991

19951992
running = netif_running(lif->netdev);
1996-
if (running)
1993+
if (running) {
1994+
netif_device_detach(lif->netdev);
19971995
err = ionic_stop(lif->netdev);
1998-
if (!err && running)
1996+
}
1997+
if (!err && running) {
19991998
ionic_open(lif->netdev);
1999+
netif_device_attach(lif->netdev);
2000+
}
20002001

20012002
clear_bit(IONIC_LIF_F_QUEUE_RESET, lif->state);
20022003

0 commit comments

Comments
 (0)