]> git.hungrycats.org Git - linux/commitdiff
ixgbe: fix AER error handling
authorEmil Tantilov <emil.s.tantilov@intel.com>
Wed, 16 Nov 2016 17:48:02 +0000 (09:48 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Nov 2017 08:21:21 +0000 (09:21 +0100)
[ Upstream commit 126db13fa0e6d05c9f94e0125f61e773bd5ab079 ]

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: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

index cd9b284bc83b6294e47361005b21e1e96352324b..13723fa32efc3e7de1c5ab27941bc816f08a75d3 100644 (file)
@@ -9221,7 +9221,7 @@ skip_bad_vf_detection:
        }
 
        if (netif_running(netdev))
-               ixgbe_down(adapter);
+               ixgbe_close_suspend(adapter);
 
        if (!test_and_set_bit(__IXGBE_DISABLED, &adapter->state))
                pci_disable_device(pdev);
@@ -9291,10 +9291,12 @@ static void ixgbe_io_resume(struct pci_dev *pdev)
        }
 
 #endif
+       rtnl_lock();
        if (netif_running(netdev))
-               ixgbe_up(adapter);
+               ixgbe_open(netdev);
 
        netif_device_attach(netdev);
+       rtnl_unlock();
 }
 
 static const struct pci_error_handlers ixgbe_err_handler = {