Skip to content

Commit

Permalink
Merge branch 'bnxt_en-shutdown-and-kexec-kdump-related-fixes'
Browse files Browse the repository at this point in the history
Michael Chan says:

====================
bnxt_en: shutdown and kexec/kdump related fixes.

2 small patches to fix kexec shutdown and kdump kernel driver init issues.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Feb 21, 2020
2 parents 3a20773 + 8743db4 commit 36a44bc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions drivers/net/ethernet/broadcom/bnxt/bnxt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -11983,10 +11991,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);
}
Expand Down

0 comments on commit 36a44bc

Please sign in to comment.