Michael Chan says: ==================== bnxt_en: shutdown and kexec/kdump related fixes. 2 small patches to fix kexec shutdown and kdump kernel driver init issues. ====================
Unified · Split
| @@ -11786,6 +11786,14 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) · 11785 unmodified lines | |||
| 11786 | if (version_printed++ == 0) | 11786 | if (version_printed++ == 0) |
| 11787 | pr_info("%s", version); | 11787 | pr_info("%s", version); |
| 11788 | 11788 | ||
| 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 | |||
| 11789 | max_irqs = bnxt_get_max_irq(pdev); | 11797 | max_irqs = bnxt_get_max_irq(pdev); |
| 11790 | dev = alloc_etherdev_mq(sizeof(*bp), max_irqs); | 11798 | dev = alloc_etherdev_mq(sizeof(*bp), max_irqs); |
| 11791 | if (!dev) | 11799 | if (!dev) |
| @@ -11983,10 +11991,10 @@ static void bnxt_shutdown(struct pci_dev *pdev) · 191 unmodified lines | |||
| 11983 | dev_close(dev); | 11991 | dev_close(dev); |
| 11984 | 11992 | ||
| 11985 | bnxt_ulp_shutdown(bp); | 11993 | bnxt_ulp_shutdown(bp); |
| 11994 | bnxt_clear_int_mode(bp); | ||
| 11995 | pci_disable_device(pdev); | ||
| 11986 | 11996 | ||
| 11987 | if (system_state == SYSTEM_POWER_OFF) { | 11997 | if (system_state == SYSTEM_POWER_OFF) { |
| 11988 | bnxt_clear_int_mode(bp); | ||
| 11989 | pci_disable_device(pdev); | ||
| 11990 | pci_wake_from_d3(pdev, bp->wol); | 11998 | pci_wake_from_d3(pdev, bp->wol); |
| 11991 | pci_set_power_state(pdev, PCI_D3hot); | 11999 | pci_set_power_state(pdev, PCI_D3hot); |
| 11992 | } | 12000 | } |