Commit 36a44bcd authored by David S. Miller's avatar David S. Miller
Browse files

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

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 3a20773b 8743db4a
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -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)
@@ -11983,10 +11991,10 @@ static void bnxt_shutdown(struct pci_dev *pdev)
		dev_close(dev);

	bnxt_ulp_shutdown(bp);

	if (system_state == SYSTEM_POWER_OFF) {
	bnxt_clear_int_mode(bp);
	pci_disable_device(pdev);

	if (system_state == SYSTEM_POWER_OFF) {
		pci_wake_from_d3(pdev, bp->wol);
		pci_set_power_state(pdev, PCI_D3hot);
	}