Skip to content

Commit

Permalink
bnxt_en: Issue PCIe FLR in kdump kernel to cleanup pending DMAs.
Browse files Browse the repository at this point in the history
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: d629522 ("bnxt_en: Reduce memory usage when running in kdump kernel.")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vasundhara Volam authored and David S. Miller committed Feb 21, 2020
1 parent 5567ae4 commit 8743db4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 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

0 comments on commit 8743db4

Please sign in to comment.