aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
diff options
context:
space:
mode:
authorShannon Nelson <snelson@pensando.io>2020-09-30 10:48:27 -0700
committerDavid S. Miller <davem@davemloft.net>2020-09-30 15:11:09 -0700
commitdf8aeaa8268f11dc3c2d0975954624cf324eab15 (patch)
treec43e49089657684fd32ed4e5f0c21761bdef5229 /drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
parentMerge branch 'tcp-exponential-backoff-in-tcp_send_ack' (diff)
downloadlinux-dev-df8aeaa8268f11dc3c2d0975954624cf324eab15.tar.xz
linux-dev-df8aeaa8268f11dc3c2d0975954624cf324eab15.zip
ionic: stop watchdog timer earlier on remove
We need to be better at making sure we don't have a link check watchdog go off while we're shutting things down, so let's stop the timer as soon as we start the remove. Meanwhile, since that was the only thing in ionic_dev_teardown(), simplify and remove that function. Signed-off-by: Shannon Nelson <snelson@pensando.io> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c')
-rw-r--r--drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
index d1d6fb6669e5..2749ce009ebc 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
@@ -350,7 +350,7 @@ err_out_port_reset:
err_out_reset:
ionic_reset(ionic);
err_out_teardown:
- ionic_dev_teardown(ionic);
+ del_timer_sync(&ionic->watchdog_timer);
pci_clear_master(pdev);
/* Don't fail the probe for these errors, keep
* the hw interface around for inspection
@@ -378,6 +378,8 @@ static void ionic_remove(struct pci_dev *pdev)
if (!ionic)
return;
+ del_timer_sync(&ionic->watchdog_timer);
+
if (ionic->lif) {
ionic_devlink_unregister(ionic);
ionic_lif_unregister(ionic->lif);
@@ -389,7 +391,6 @@ static void ionic_remove(struct pci_dev *pdev)
ionic_port_reset(ionic);
ionic_reset(ionic);
- ionic_dev_teardown(ionic);
pci_clear_master(pdev);
ionic_unmap_bars(ionic);
pci_release_regions(pdev);