The driver forces an FLR during kdump kernel initialization to reset the device. If the NIC is behind a PCIe switch in synthetic (smart) mode, the switch may need to see that the BARs have been initialized before it will pass Mem read/write TLPs to the NIC. Save the PCI state before FLR and restore the state after FLR. The BARs have to be cleared to ensure that they get re-initialized. Fixes: 8743db4a9acf ("bnxt_en: Issue PCIe FLR in kdump kernel to cleanup pending DMAs.") Reviewed-by: Kalesh AP Reviewed-by: Somnath Kotur Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index a76674fd0d6b..c3d561ac53dc 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -17091,7 +17091,10 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) */ if (is_kdump_kernel()) { pci_clear_master(pdev); + pci_save_state(pdev); pcie_flr(pdev); + bnxt_clear_bars(pdev); + pci_restore_state(pdev); } max_irqs = bnxt_get_max_irq(pdev); -- 2.51.0