Patch "bnxt_en: Unregister PTP during PCI shutdown and suspend" has been added to the 6.11-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    bnxt_en: Unregister PTP during PCI shutdown and suspend

to the 6.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     bnxt_en-unregister-ptp-during-pci-shutdown-and-suspe.patch
and it can be found in the queue-6.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 3e4b86efe4aeb8faddfebfb3e02cb04673a5bba9
Author: Michael Chan <michael.chan@xxxxxxxxxxxx>
Date:   Fri Nov 22 14:45:46 2024 -0800

    bnxt_en: Unregister PTP during PCI shutdown and suspend
    
    [ Upstream commit 3661c05c54e8db7064aa96a0774654740974dffc ]
    
    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: a521c8a01d26 ("bnxt_en: Move bnxt_ptp_init() from bnxt_open() back to bnxt_init_one()")
    Cc: Richard Cochran <richardcochran@xxxxxxxxx>
    Reviewed-by: Somnath Kotur <somnath.kotur@xxxxxxxxxxxx>
    Reviewed-by: Pavan Chebbi <pavan.chebbi@xxxxxxxxxxxx>
    Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@xxxxxxxxxxxx>
    Signed-off-by: Michael Chan <michael.chan@xxxxxxxxxxxx>
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index f999c10cefac6..68e6e202d4ecd 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -15933,6 +15933,7 @@ static void bnxt_shutdown(struct pci_dev *pdev)
 	if (netif_running(dev))
 		dev_close(dev);
 
+	bnxt_ptp_clear(bp);
 	bnxt_clear_int_mode(bp);
 	pci_disable_device(pdev);
 
@@ -15960,6 +15961,7 @@ static int bnxt_suspend(struct device *device)
 		rc = bnxt_close(dev);
 	}
 	bnxt_hwrm_func_drv_unrgtr(bp);
+	bnxt_ptp_clear(bp);
 	pci_disable_device(bp->pdev);
 	bnxt_free_ctx_mem(bp);
 	rtnl_unlock();
@@ -16001,6 +16003,10 @@ static int bnxt_resume(struct device *device)
 		goto resume_exit;
 	}
 
+	if (bnxt_ptp_init(bp)) {
+		kfree(bp->ptp_cfg);
+		bp->ptp_cfg = NULL;
+	}
 	bnxt_get_wol_settings(bp);
 	if (netif_running(dev)) {
 		rc = bnxt_open(dev);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux