Skip to content

Commit 6f1ab16

Browse files
committed
bnxt_en: Unregister PTP during PCI shutdown and suspend
jira LE-2522 Rebuild_History Non-Buildable kernel-5.14.0-503.29.1.el9_5 commit-author Michael Chan <[email protected]> commit 3661c05 If we go through the PCI shutdown or suspend path, we shutdown the NIC but PTP remains registered. If the kernel continues to run for a little bit, the periodic PTP .do_aux_work() function may be called and it will read the PHC from the BAR register. Since the device has already been disabled, it will cause a PCIe completion timeout. Fix it by calling bnxt_ptp_clear() in the PCI shutdown/suspend handlers. bnxt_ptp_clear() will unregister from PTP and .do_aux_work() will be canceled. In bnxt_resume(), we need to re-initialize PTP. Fixes: a521c8a ("bnxt_en: Move bnxt_ptp_init() from bnxt_open() back to bnxt_init_one()") Cc: Richard Cochran <[email protected]> Reviewed-by: Somnath Kotur <[email protected]> Reviewed-by: Pavan Chebbi <[email protected]> Reviewed-by: Kalesh AP <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: Paolo Abeni <[email protected]> (cherry picked from commit 3661c05) Signed-off-by: Jonathan Maple <[email protected]>
1 parent b673ccb commit 6f1ab16

File tree

1 file changed

+6
-0
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+6
-0
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14552,6 +14552,7 @@ static void bnxt_shutdown(struct pci_dev *pdev)
1455214552
if (netif_running(dev))
1455314553
dev_close(dev);
1455414554

14555+
bnxt_ptp_clear(bp);
1455514556
bnxt_clear_int_mode(bp);
1455614557
pci_disable_device(pdev);
1455714558

@@ -14578,6 +14579,7 @@ static int bnxt_suspend(struct device *device)
1457814579
rc = bnxt_close(dev);
1457914580
}
1458014581
bnxt_hwrm_func_drv_unrgtr(bp);
14582+
bnxt_ptp_clear(bp);
1458114583
pci_disable_device(bp->pdev);
1458214584
bnxt_free_ctx_mem(bp);
1458314585
rtnl_unlock();
@@ -14619,6 +14621,10 @@ static int bnxt_resume(struct device *device)
1461914621
goto resume_exit;
1462014622
}
1462114623

14624+
if (bnxt_ptp_init(bp)) {
14625+
kfree(bp->ptp_cfg);
14626+
bp->ptp_cfg = NULL;
14627+
}
1462214628
bnxt_get_wol_settings(bp);
1462314629
if (netif_running(dev)) {
1462414630
rc = bnxt_open(dev);

0 commit comments

Comments
 (0)