Skip to content

Commit 11789fe

Browse files
committed
Merge branch 'ionic-watchdog-training'
Shannon Nelson says: ==================== ionic watchdog training Our link watchdog displayed a couple of unfriendly behaviors in some recent stress testing. These patches change the startup and stop timing in order to be sure that expected structures are ready to be used by the watchdog. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 9b5cbf4 + 0816e0c commit 11789fe

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
350350
err_out_reset:
351351
ionic_reset(ionic);
352352
err_out_teardown:
353-
ionic_dev_teardown(ionic);
353+
del_timer_sync(&ionic->watchdog_timer);
354354
pci_clear_master(pdev);
355355
/* Don't fail the probe for these errors, keep
356356
* the hw interface around for inspection
@@ -378,6 +378,8 @@ static void ionic_remove(struct pci_dev *pdev)
378378
if (!ionic)
379379
return;
380380

381+
del_timer_sync(&ionic->watchdog_timer);
382+
381383
if (ionic->lif) {
382384
ionic_devlink_unregister(ionic);
383385
ionic_lif_unregister(ionic->lif);
@@ -389,7 +391,6 @@ static void ionic_remove(struct pci_dev *pdev)
389391

390392
ionic_port_reset(ionic);
391393
ionic_reset(ionic);
392-
ionic_dev_teardown(ionic);
393394
pci_clear_master(pdev);
394395
ionic_unmap_bars(ionic);
395396
pci_release_regions(pdev);

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ static void ionic_watchdog_cb(struct timer_list *t)
1919
mod_timer(&ionic->watchdog_timer,
2020
round_jiffies(jiffies + ionic->watchdog_period));
2121

22+
if (!ionic->lif)
23+
return;
24+
2225
hb = ionic_heartbeat_check(ionic);
2326

24-
if (hb >= 0 && ionic->lif)
27+
if (hb >= 0)
2528
ionic_link_status_check_request(ionic->lif, false);
2629
}
2730

@@ -98,11 +101,6 @@ int ionic_dev_setup(struct ionic *ionic)
98101
return 0;
99102
}
100103

101-
void ionic_dev_teardown(struct ionic *ionic)
102-
{
103-
del_timer_sync(&ionic->watchdog_timer);
104-
}
105-
106104
/* Devcmd Interface */
107105
int ionic_heartbeat_check(struct ionic *ionic)
108106
{

drivers/net/ethernet/pensando/ionic/ionic_dev.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ static inline bool ionic_q_has_space(struct ionic_queue *q, unsigned int want)
283283

284284
void ionic_init_devinfo(struct ionic *ionic);
285285
int ionic_dev_setup(struct ionic *ionic);
286-
void ionic_dev_teardown(struct ionic *ionic);
287286

288287
void ionic_dev_cmd_go(struct ionic_dev *idev, union ionic_dev_cmd *cmd);
289288
u8 ionic_dev_cmd_status(struct ionic_dev *idev);

0 commit comments

Comments
 (0)