]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.drivers/e1000-return-pci_ers_result_disconnect-on-permanent-error.patch
Fix oinkmaster patch.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.drivers / e1000-return-pci_ers_result_disconnect-on-permanent-error.patch
CommitLineData
82094b55
AF
1From eab633021c26025b34f36f79f0311d3d99f40ceb Mon Sep 17 00:00:00 2001
2From: Andre Detsch <adetsch@br.ibm.com>
3Date: Tue, 30 Jun 2009 12:46:13 +0000
4Subject: [PATCH] e1000: return PCI_ERS_RESULT_DISCONNECT on permanent error
5References: bnc#534961
6Patch-mainline: v2.6.31-rc1-50-geab6330
7
8PCI drivers that implement the io_error_detected callback
9should return PCI_ERS_RESULT_DISCONNECT if the state
10passed in is pci_channel_io_perm_failure. This state is
11not checked in many of the network drivers.
12
13The patch fixes the omission in the e1000 driver.
14
15Based on Mike Mason's similar patch for e1000e.
16
17Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
18CC: Mike Mason <mmlnx@us.ibm.com>
19Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
20Signed-off-by: David S. Miller <davem@davemloft.net>
21Signed-off-by: Brandon Philips <bphilips@suse.de>
22---
23 drivers/net/e1000/e1000_main.c | 3 +++
24 1 file changed, 3 insertions(+)
25
26Index: linux-2.6.27-SLE11_BRANCH/drivers/net/e1000/e1000_main.c
27===================================================================
28--- linux-2.6.27-SLE11_BRANCH.orig/drivers/net/e1000/e1000_main.c
29+++ linux-2.6.27-SLE11_BRANCH/drivers/net/e1000/e1000_main.c
30@@ -5170,6 +5170,9 @@ static pci_ers_result_t e1000_io_error_d
31
32 netif_device_detach(netdev);
33
34+ if (state == pci_channel_io_perm_failure)
35+ return PCI_ERS_RESULT_DISCONNECT;
36+
37 if (netif_running(netdev))
38 e1000_down(adapter);
39 pci_disable_device(pdev);