Commit 59ed6eecff4aa00c5c5d18ffd180acac108d596e

Authored by Alexander Duyck
Committed by David S. Miller
1 parent c93b5a76d5

igb: return PCI_ERS_RESULT_DISCONNECT on permanent error

PCI drivers that implement the io_error_detected callback should return
PCI_ERS_RESULT_DISCONNECT if the state passed in is
pci_channel_io_perm_failure.  This patch fixes the issue for igb.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff

drivers/net/igb/igb_main.c
... ... @@ -5339,6 +5339,9 @@
5339 5339  
5340 5340 netif_device_detach(netdev);
5341 5341  
  5342 + if (state == pci_channel_io_perm_failure)
  5343 + return PCI_ERS_RESULT_DISCONNECT;
  5344 +
5342 5345 if (netif_running(netdev))
5343 5346 igb_down(adapter);
5344 5347 pci_disable_device(pdev);