]>
Commit | Line | Data |
---|---|---|
82094b55 AF |
1 | From eab633021c26025b34f36f79f0311d3d99f40ceb Mon Sep 17 00:00:00 2001 |
2 | From: Andre Detsch <adetsch@br.ibm.com> | |
3 | Date: Tue, 30 Jun 2009 12:46:13 +0000 | |
4 | Subject: [PATCH] e1000: return PCI_ERS_RESULT_DISCONNECT on permanent error | |
5 | References: bnc#534961 | |
6 | Patch-mainline: v2.6.31-rc1-50-geab6330 | |
7 | ||
8 | PCI drivers that implement the io_error_detected callback | |
9 | should return PCI_ERS_RESULT_DISCONNECT if the state | |
10 | passed in is pci_channel_io_perm_failure. This state is | |
11 | not checked in many of the network drivers. | |
12 | ||
13 | The patch fixes the omission in the e1000 driver. | |
14 | ||
15 | Based on Mike Mason's similar patch for e1000e. | |
16 | ||
17 | Signed-off-by: Andre Detsch <adetsch@br.ibm.com> | |
18 | CC: Mike Mason <mmlnx@us.ibm.com> | |
19 | Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> | |
20 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
21 | Signed-off-by: Brandon Philips <bphilips@suse.de> | |
22 | --- | |
23 | drivers/net/e1000/e1000_main.c | 3 +++ | |
24 | 1 file changed, 3 insertions(+) | |
25 | ||
26 | Index: 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); |