Commit b59eabd2 authored by Shannon Nelson's avatar Shannon Nelson Committed by David S. Miller

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: beead698 ("ionic: Add the basic NDO callbacks for netdev support")
Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
Acked-by: default avatarJonathan Toppins <jtoppins@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ca882609
...@@ -1694,15 +1694,15 @@ static void ionic_stop_queues(struct ionic_lif *lif) ...@@ -1694,15 +1694,15 @@ static void ionic_stop_queues(struct ionic_lif *lif)
if (!test_and_clear_bit(IONIC_LIF_F_UP, lif->state)) if (!test_and_clear_bit(IONIC_LIF_F_UP, lif->state))
return; return;
ionic_txrx_disable(lif);
netif_tx_disable(lif->netdev); netif_tx_disable(lif->netdev);
ionic_txrx_disable(lif);
} }
int ionic_stop(struct net_device *netdev) int ionic_stop(struct net_device *netdev)
{ {
struct ionic_lif *lif = netdev_priv(netdev); struct ionic_lif *lif = netdev_priv(netdev);
if (!netif_device_present(netdev)) if (test_bit(IONIC_LIF_F_FW_RESET, lif->state))
return 0; return 0;
ionic_stop_queues(lif); ionic_stop_queues(lif);
...@@ -1985,18 +1985,19 @@ int ionic_reset_queues(struct ionic_lif *lif) ...@@ -1985,18 +1985,19 @@ int ionic_reset_queues(struct ionic_lif *lif)
bool running; bool running;
int err = 0; int err = 0;
/* Put off the next watchdog timeout */
netif_trans_update(lif->netdev);
err = ionic_wait_for_bit(lif, IONIC_LIF_F_QUEUE_RESET); err = ionic_wait_for_bit(lif, IONIC_LIF_F_QUEUE_RESET);
if (err) if (err)
return err; return err;
running = netif_running(lif->netdev); running = netif_running(lif->netdev);
if (running) if (running) {
netif_device_detach(lif->netdev);
err = ionic_stop(lif->netdev); err = ionic_stop(lif->netdev);
if (!err && running) }
if (!err && running) {
ionic_open(lif->netdev); ionic_open(lif->netdev);
netif_device_attach(lif->netdev);
}
clear_bit(IONIC_LIF_F_QUEUE_RESET, lif->state); clear_bit(IONIC_LIF_F_QUEUE_RESET, lif->state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment