]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.drivers/e1000e-io_error_detected-callback-should-return-PCI_.patch
Fix oinkmaster patch.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.drivers / e1000e-io_error_detected-callback-should-return-PCI_.patch
CommitLineData
82094b55
AF
1From c93b5a76d58656158d195a7df507ebc660010969 Mon Sep 17 00:00:00 2001
2From: Mike Mason <mmlnx@us.ibm.com>
3Date: Tue, 30 Jun 2009 12:45:53 +0000
4Subject: [PATCH] e1000e: io_error_detected callback should return PCI_ERS_RESULT_DISCONNECT
5References: bnc#534977
6Patch-mainline: v2.6.31-rc1-51-gc93b5a7
7
8on permanent failure
9
10PCI drivers that implement the io_error_detected callback
11should return PCI_ERS_RESULT_DISCONNECT if the state
12passed in is pci_channel_io_perm_failure. This state is not
13checked in many of the network drivers.
14
15This patch fixes the omission in the e1000e driver.
16
17Signed-off-by: Mike Mason <mmlnx@us.ibm.com>
18Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
19Signed-off-by: David S. Miller <davem@davemloft.net>
20Signed-off-by: Brandon Philips <bphilips@suse.de>
21---
22 drivers/net/e1000e/netdev.c | 3 +++
23 1 files changed, 3 insertions(+), 0 deletions(-)
24
25diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
26index 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--
401.6.3.3
41