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

ionic: start watchdog after all is setup

The watchdog expects the lif to fully exist when it goes off,
so lets not start the watchdog until all is ready in case there
is some quirky time dialation that makes probe take multiple
seconds.

Fixes: 089406bc ("ionic: add a watchdog timer to monitor heartbeat")
Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bc0bf9de
...@@ -331,6 +331,9 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -331,6 +331,9 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto err_out_deregister_lifs; goto err_out_deregister_lifs;
} }
mod_timer(&ionic->watchdog_timer,
round_jiffies(jiffies + ionic->watchdog_period));
return 0; return 0;
err_out_deregister_lifs: err_out_deregister_lifs:
...@@ -348,7 +351,6 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -348,7 +351,6 @@ 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:
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
......
...@@ -122,9 +122,6 @@ int ionic_dev_setup(struct ionic *ionic) ...@@ -122,9 +122,6 @@ int ionic_dev_setup(struct ionic *ionic)
idev->fw_generation = IONIC_FW_STS_F_GENERATION & idev->fw_generation = IONIC_FW_STS_F_GENERATION &
ioread8(&idev->dev_info_regs->fw_status); ioread8(&idev->dev_info_regs->fw_status);
mod_timer(&ionic->watchdog_timer,
round_jiffies(jiffies + ionic->watchdog_period));
idev->db_pages = bar->vaddr; idev->db_pages = bar->vaddr;
idev->phy_db_pages = bar->bus_addr; idev->phy_db_pages = bar->bus_addr;
......
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