Commit 8743db4a authored by Vasundhara Volam's avatar Vasundhara Volam Committed by David S. Miller

bnxt_en: Issue PCIe FLR in kdump kernel to cleanup pending DMAs.

If crashed kernel does not shutdown the NIC properly, PCIe FLR
is required in the kdump kernel in order to initialize all the
functions properly.

Fixes: d629522e ("bnxt_en: Reduce memory usage when running in kdump kernel.")
Signed-off-by: default avatarVasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5567ae4a
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment