Subject: [PATCH] e1000e: io_error_detected callback should return PCI_ERS_RESULT_DISCONNECT on permanent failure

From: Mike Mason <[email-masked]>
Date: Fri, 29 May 2009 14:16:40 -0700

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 e1000e driver.

Signed-off-by: Mike Mason <[email-masked]> 

--- a/drivers/net/e1000e/netdev.c	2009-05-23 14:47:00.000000000 -0700
+++ b/drivers/net/e1000e/netdev.c	2009-05-29 13:43:24.000000000 -0700
@@ -4616,6 +4616,9 @@ static pci_ers_result_t e1000_io_error_d
 
 	netif_device_detach(netdev);
 
+	if (state == pci_channel_io_perm_failure)
+		return PCI_ERS_RESULT_DISCONNECT;
+
 	if (netif_running(netdev))
 		e1000e_down(adapter);
 	pci_disable_device(pdev);