Commit f12976ce authored by Emil Tantilov's avatar Emil Tantilov Committed by Greg Kroah-Hartman

ixgbe: fix AER error handling


[ Upstream commit 126db13f ]

Make sure that we free the IRQs in ixgbe_io_error_detected() when
responding to an PCIe AER error and also restore them when the
interface recovers from it.

Previously it was possible to trigger BUG_ON() check in free_msix_irqs()
in the case where we call ixgbe_remove() after a failed recovery from
AER error because the interrupts were not freed.
Signed-off-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 865fe71c
...@@ -9221,7 +9221,7 @@ static pci_ers_result_t ixgbe_io_error_detected(struct pci_dev *pdev, ...@@ -9221,7 +9221,7 @@ static pci_ers_result_t ixgbe_io_error_detected(struct pci_dev *pdev,
} }
if (netif_running(netdev)) if (netif_running(netdev))
ixgbe_down(adapter); ixgbe_close_suspend(adapter);
if (!test_and_set_bit(__IXGBE_DISABLED, &adapter->state)) if (!test_and_set_bit(__IXGBE_DISABLED, &adapter->state))
pci_disable_device(pdev); pci_disable_device(pdev);
...@@ -9291,10 +9291,12 @@ static void ixgbe_io_resume(struct pci_dev *pdev) ...@@ -9291,10 +9291,12 @@ static void ixgbe_io_resume(struct pci_dev *pdev)
} }
#endif #endif
rtnl_lock();
if (netif_running(netdev)) if (netif_running(netdev))
ixgbe_up(adapter); ixgbe_open(netdev);
netif_device_attach(netdev); netif_device_attach(netdev);
rtnl_unlock();
} }
static const struct pci_error_handlers ixgbe_err_handler = { static const struct pci_error_handlers ixgbe_err_handler = {
......
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