e1000: return PCI_ERS_RESULT_DISCONNECT on permanent error
Subsystems (2)
PATCH 1/1 e1000: 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 state is not checked in many of the network drivers.
This patch fixes the omission in the e1000 driver.
Based on Mike Mason's similar patch for e1000e.
--- drivers/net/e1000/e1000_main.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/e1000/e1000_main.c +3 -0
@@ -4816,6 +4816,9 @@ static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev,struct e1000_adapter *adapter =netdev_priv (netdev);netif_device_detach (netdev); + +if (state == pci_channel_io_perm_failure) +return PCI_ERS_RESULT_DISCONNECT ;if (netif_running (netdev))e1000_down (adapter);
Signature · 1 line
1.6.0.2
Quoted 20 lines · Andre Detsch
PCI drivers that implement the
io_error_detectedcallback should returnPCI_ERS_RESULT_DISCONNECTif the state passed in ispci_channel_io_perm_failure. This state is not checked in many of the network drivers.This patch fixes the omission in the e1000 driver.
Based on Mike Mason's similar patch for e1000e.
Signed-off-by Andre Detsch <[email protected]>Cc Mike Mason <[email protected]>---
drivers/net/e1000/e1000_main.c | 3 +++1 files changed, 3 insertions(+), 0 deletions(-)drivers/net/e1000/e1000_main.c +0
-0
drivers/net/e1000/e1000_main.c static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev,
Quoted 10 lines
drivers/net/e1000/e1000_main.c +3
-1@@ -4816,6 +4816,9 @@ static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev, struct e1000_adapter *adapter = netdev_priv(netdev); netif_device_detach(netdev); + + if (state == pci_channel_io_perm_failure) + return PCI_ERS_RESULT_DISCONNECT; if (netif_running(netdev)) e1000_down(adapter); --
Thanks, I have added this to my queue and will push it with the e1000e fix.
Signature · 2 lines
Cheers, Jeff