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: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
36a44bcdd8
|
@ -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);
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue