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

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: default avatarShannon Nelson <snelson@pensando.io>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9b5cbf46
...@@ -350,7 +350,7 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -350,7 +350,7 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
err_out_reset: err_out_reset:
ionic_reset(ionic); ionic_reset(ionic);
err_out_teardown: err_out_teardown:
ionic_dev_teardown(ionic); del_timer_sync(&ionic->watchdog_timer);
pci_clear_master(pdev); pci_clear_master(pdev);
/* Don't fail the probe for these errors, keep /* Don't fail the probe for these errors, keep
* the hw interface around for inspection * the hw interface around for inspection
...@@ -378,6 +378,8 @@ static void ionic_remove(struct pci_dev *pdev) ...@@ -378,6 +378,8 @@ static void ionic_remove(struct pci_dev *pdev)
if (!ionic) if (!ionic)
return; return;
del_timer_sync(&ionic->watchdog_timer);
if (ionic->lif) { if (ionic->lif) {
ionic_devlink_unregister(ionic); ionic_devlink_unregister(ionic);
ionic_lif_unregister(ionic->lif); ionic_lif_unregister(ionic->lif);
...@@ -389,7 +391,6 @@ static void ionic_remove(struct pci_dev *pdev) ...@@ -389,7 +391,6 @@ static void ionic_remove(struct pci_dev *pdev)
ionic_port_reset(ionic); ionic_port_reset(ionic);
ionic_reset(ionic); ionic_reset(ionic);
ionic_dev_teardown(ionic);
pci_clear_master(pdev); pci_clear_master(pdev);
ionic_unmap_bars(ionic); ionic_unmap_bars(ionic);
pci_release_regions(pdev); pci_release_regions(pdev);
......
...@@ -98,11 +98,6 @@ int ionic_dev_setup(struct ionic *ionic) ...@@ -98,11 +98,6 @@ int ionic_dev_setup(struct ionic *ionic)
return 0; return 0;
} }
void ionic_dev_teardown(struct ionic *ionic)
{
del_timer_sync(&ionic->watchdog_timer);
}
/* Devcmd Interface */ /* Devcmd Interface */
int ionic_heartbeat_check(struct ionic *ionic) int ionic_heartbeat_check(struct ionic *ionic)
{ {
......
...@@ -283,7 +283,6 @@ static inline bool ionic_q_has_space(struct ionic_queue *q, unsigned int want) ...@@ -283,7 +283,6 @@ static inline bool ionic_q_has_space(struct ionic_queue *q, unsigned int want)
void ionic_init_devinfo(struct ionic *ionic); void ionic_init_devinfo(struct ionic *ionic);
int ionic_dev_setup(struct ionic *ionic); int ionic_dev_setup(struct ionic *ionic);
void ionic_dev_teardown(struct ionic *ionic);
void ionic_dev_cmd_go(struct ionic_dev *idev, union ionic_dev_cmd *cmd); void ionic_dev_cmd_go(struct ionic_dev *idev, union ionic_dev_cmd *cmd);
u8 ionic_dev_cmd_status(struct ionic_dev *idev); u8 ionic_dev_cmd_status(struct ionic_dev *idev);
......
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