Skip to content

Commit 3e36031

Browse files
emuslnkuba-moo
authored andcommitted
pds_core: no health-thread in VF path
The VFs don't run the health thread, so don't try to stop or restart the non-existent timer or work item. Fixes: d9407ff ("pds_core: Prevent health thread from running during reset/remove") Reviewed-by: Brett Creeley <brett.creeley@amd.com> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Link: https://lore.kernel.org/r/20240210002002.49483-1-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 2f74258 commit 3e36031

File tree

1 file changed

+6
-0
lines changed
  • drivers/net/ethernet/amd/pds_core

1 file changed

+6
-0
lines changed

drivers/net/ethernet/amd/pds_core/main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,13 +451,19 @@ static void pdsc_remove(struct pci_dev *pdev)
451451

452452
static void pdsc_stop_health_thread(struct pdsc *pdsc)
453453
{
454+
if (pdsc->pdev->is_virtfn)
455+
return;
456+
454457
timer_shutdown_sync(&pdsc->wdtimer);
455458
if (pdsc->health_work.func)
456459
cancel_work_sync(&pdsc->health_work);
457460
}
458461

459462
static void pdsc_restart_health_thread(struct pdsc *pdsc)
460463
{
464+
if (pdsc->pdev->is_virtfn)
465+
return;
466+
461467
timer_setup(&pdsc->wdtimer, pdsc_wdtimer_cb, 0);
462468
mod_timer(&pdsc->wdtimer, jiffies + 1);
463469
}

0 commit comments

Comments
 (0)