History

Merge branch 'bnxt_en-shutdown-and-kexec-kdump-related-fixes'

Michael Chan says: ==================== bnxt_en: shutdown and kexec/kdump related fixes. 2 small patches to fix kexec shutdown and kdump kernel driver init issues. ====================

David S. Miller committed 6 years ago

Commit 36a44bc2 parents 3a20773 8743db41 file · +10 −2Browse files

Unified · Split

drivers/net/ethernet/broadcom/bnxt/bnxt.c+10−2
@@ -11786,6 +11786,14 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) · 11785 unmodified lines
1178611786 if (version_printed++ == 0)
1178711787 pr_info("%s", version);
1178811788
11789+ /* Clear any pending DMA transactions from crash kernel
11790+ * while loading driver in capture kernel.
11791+ */
11792+ if (is_kdump_kernel()) {
11793+ pci_clear_master(pdev);
11794+ pcie_flr(pdev);
11795+ }
11796+
1178911797 max_irqs = bnxt_get_max_irq(pdev);
1179011798 dev = alloc_etherdev_mq(sizeof(*bp), max_irqs);
1179111799 if (!dev)
@@ -11983,10 +11991,10 @@ static void bnxt_shutdown(struct pci_dev *pdev) · 191 unmodified lines
1198311991 dev_close(dev);
1198411992
1198511993 bnxt_ulp_shutdown(bp);
11994+ bnxt_clear_int_mode(bp);
11995+ pci_disable_device(pdev);
1198611996
1198711997 if (system_state == SYSTEM_POWER_OFF) {
11988− bnxt_clear_int_mode(bp);
11989− pci_disable_device(pdev);
1199011998 pci_wake_from_d3(pdev, bp->wol);
1199111999 pci_set_power_state(pdev, PCI_D3hot);
1199212000 }