Skip to content

Commit

Permalink
ixgbe: fix AER error handling
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Andrew Bowers <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
  • Loading branch information
etantilov authored and Jeff Kirsher committed Jan 3, 2017
1 parent a9d2d53 commit 126db13
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -10082,7 +10082,7 @@ static pci_ers_result_t ixgbe_io_error_detected(struct pci_dev *pdev,
}

if (netif_running(netdev))
ixgbe_down(adapter);
ixgbe_close_suspend(adapter);

if (!test_and_set_bit(__IXGBE_DISABLED, &adapter->state))
pci_disable_device(pdev);
Expand Down Expand Up @@ -10152,10 +10152,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 = {
Expand Down

0 comments on commit 126db13

Please sign in to comment.