]>
Commit | Line | Data |
---|---|---|
82094b55 AF |
1 | From c93b5a76d58656158d195a7df507ebc660010969 Mon Sep 17 00:00:00 2001 |
2 | From: Mike Mason <mmlnx@us.ibm.com> | |
3 | Date: Tue, 30 Jun 2009 12:45:53 +0000 | |
4 | Subject: [PATCH] e1000e: io_error_detected callback should return PCI_ERS_RESULT_DISCONNECT | |
5 | References: bnc#534977 | |
6 | Patch-mainline: v2.6.31-rc1-51-gc93b5a7 | |
7 | ||
8 | on permanent failure | |
9 | ||
10 | PCI drivers that implement the io_error_detected callback | |
11 | should return PCI_ERS_RESULT_DISCONNECT if the state | |
12 | passed in is pci_channel_io_perm_failure. This state is not | |
13 | checked in many of the network drivers. | |
14 | ||
15 | This patch fixes the omission in the e1000e driver. | |
16 | ||
17 | Signed-off-by: Mike Mason <mmlnx@us.ibm.com> | |
18 | Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> | |
19 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
20 | Signed-off-by: Brandon Philips <bphilips@suse.de> | |
21 | --- | |
22 | drivers/net/e1000e/netdev.c | 3 +++ | |
23 | 1 files changed, 3 insertions(+), 0 deletions(-) | |
24 | ||
25 | diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c | |
26 | index 679885a..63415bb 100644 | |
27 | --- a/drivers/net/e1000e/netdev.c | |
28 | +++ b/drivers/net/e1000e/netdev.c | |
29 | @@ -4785,6 +4785,9 @@ static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev, | |
30 | ||
31 | netif_device_detach(netdev); | |
32 | ||
33 | + if (state == pci_channel_io_perm_failure) | |
34 | + return PCI_ERS_RESULT_DISCONNECT; | |
35 | + | |
36 | if (netif_running(netdev)) | |
37 | e1000e_down(adapter); | |
38 | pci_disable_device(pdev); | |
39 | -- | |
40 | 1.6.3.3 | |
41 |