bnxt_en: shutdown and kexec/kdump related fixes.
Michael Chan
maintainercover bnxt_en: shutdown and kexec/kdump related fixes.
2 small patches to fix kexec shutdown and kdump kernel driver init issues.
Please also queue these for -stable. Thanks.
Vasundhara Volam (2):
bnxt_en: Improve device shutdown method.
bnxt_en: Issue PCIe FLR in kdump kernel to cleanup pending DMAs.
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
Signature · 1 line
2.5.1
Michael Chan
maintainerPATCH 1/2 bnxt_en: Improve device shutdown method.
From: Vasundhara Volam <[email protected]>
Especially when bnxt_shutdown() is called during kexec, we need to disable MSIX and disable Bus Master to completely quiesce the device. Make these 2 calls unconditionally in the shutdown method.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +2 -2
@@ -11983,10 +11983,10 @@ static void bnxt_shutdown(struct pci_dev *pdev)dev_close (dev);bnxt_ulp_shutdown (bp); +bnxt_clear_int_mode (bp); +pci_disable_device (pdev);if (system_state ==SYSTEM_POWER_OFF ) { -bnxt_clear_int_mode (bp); -pci_disable_device (pdev);pci_wake_from_d3 (pdev, bp->wol);pci_set_power_state (pdev, PCI_D3hot); }
Signature · 1 line
2.5.1
Michael Chan
maintainerPATCH 2/2 bnxt_en: Issue PCIe FLR in kdump kernel to cleanup pending DMAs.
In reply to Michael ChanFrom: Vasundhara Volam <[email protected]>
If crashed kernel does not shutdown the NIC properly, PCIe FLR is required in the kdump kernel in order to initialize all the functions properly.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +8 -0
@@ -11786,6 +11786,14 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)if (version_printed++ ==0 )pr_info ("%s" , version); +/* Clear any pending DMA transactions from crash kernel +* while loading driver in capture kernel. +*/ +if (is_kdump_kernel ()) { +pci_clear_master (pdev); +pcie_flr (pdev); + } + max_irqs =bnxt_get_max_irq (pdev); dev =alloc_etherdev_mq (sizeof (*bp), max_irqs);if (!dev)
Signature · 1 line
2.5.1
From: Michael Chan <[email protected]>
Date: Thu, 20 Feb 2020 17:26:33 -0500
Quoted 1 line
2 small patches to fix kexec shutdown and kdump kernel driver init issues.
Applied.
Quoted 1 line
Please also queue these for -stable. Thanks.
Queued up.
Thank you.