Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 2115

kernel-2.6.18-194.11.1.el5.src.rpm

From: Dean Nelson <dnelson@redhat.com>
Date: Fri, 7 Aug 2009 20:20:16 -0400
Subject: [net] e1000e: return PCI_ERS_RESULT_DISCONNECT on fail
Message-id: 20090808002015.4989.65038.send-patch@aqua
O-Subject: [RHEL5.5 PATCH] e1000e: return PCI_ERS_RESULT_DISCONNECT on permanent failure
Bugzilla: 508387
RH-Acked-by: Jiri Pirko <jpirko@redhat.com>
RH-Acked-by: Prarit Bhargava <prarit@redhat.com>
RH-Acked-by: Andy Gospodarek <gospo@redhat.com>

PCI drivers that implement the struct pci_error_handlers' 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 e1000e.

This patch is a backport of an upstream commit.
See http://git.kernel.org/linus/c93b5a76d58656158d195a7df507ebc660010969

Actual testing of this patch was done by IBM.
See RHBZ comments #10 & #11.

Resolves RHBZ 508387.

diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index c9d9c84..d4d1662 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -4766,6 +4766,9 @@ static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev,
 
 	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);