From: Yuval Mintz Date: Wed, 24 Apr 2013 01:45:02 +0000 (+0000) Subject: bnx2x: Allow recovery from second slot reset X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=70632d0afe749c44562c1112eea0839774bcf578;p=linux-beck.git bnx2x: Allow recovery from second slot reset As part of PCIe Advanced Error Reporting flow, if a fatal PCI error occurs, the AER driver will cause bnx2x's PCI-core to reset. The driver's PCI error handlers will in turn restore the PCI configuration space values by calling `pci_restore_state'. However, as bnx2x does not save the PCI configuration after restoration, An additional fatal PCI error will leave the function in an unstable state until reboot, as the registers in the PCI configuration space will contain reset values. Signed-off-by: Yuval Mintz Signed-off-by: Ariel Elior Signed-off-by: Eilon Greenstein Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index dedf68377e74..fbfff1b3365e 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -12807,6 +12807,7 @@ static pci_ers_result_t bnx2x_io_slot_reset(struct pci_dev *pdev) pci_set_master(pdev); pci_restore_state(pdev); + pci_save_state(pdev); if (netif_running(dev)) bnx2x_set_power_state(bp, PCI_D0);