Skip to contentSkip to conversation

bnxt_en: shutdown and kexec/kdump related fixes.

PATCH Applied Michael Chan 2 participants 4 messages Feb 20, 2020 – Feb 21, 2020

Subsystems (3)
lore
Share & tools
lore

Michael Chan

author maintainer
#0 lore raw

cover 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
author maintainer
#1 lore raw

PATCH 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.

Fixes c20dc142dd7b ("bnxt_en: Disable bus master during PCI shutdown and driver unload.")
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +2 -2
index 597e6fd..2ad007e 100644
@@ -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
author maintainer
#2 lore raw

PATCH 2/2 bnxt_en: Issue PCIe FLR in kdump kernel to cleanup pending DMAs.

In reply to Michael Chan

From: 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.

Fixes d629522e1d66 ("bnxt_en: Reduce memory usage when running in kdump kernel.")
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +8 -0
index 2ad007e..fd6e0e4 100644
@@ -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
maintainer Applied
#3 lore raw
In reply to Michael Chan

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.