From: Dean Nelson <dnelson@redhat.com>
To: netdev@vger.kernel.org
Cc: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next-2.6 PATCH 6/9] ixgb: return PCI_ERS_RESULT_DISCONNECT on permanent failure
Date: Fri, 31 Jul 2009 15:13:40 -0400 [thread overview]
Message-ID: <20090731191340.5470.79342.send-patch@aqua> (raw)
In-Reply-To: <20090731191254.5470.99642.send-patch@aqua>
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 ixgb.
Signed-off-by: Dean Nelson <dnelson@redhat.com>
---
This patch has not been tested, since I don't have the hardware to test it.
It is based on a few recent patches. See the following commits:
http://git.kernel.org/linus/c93b5a76d58656158d195a7df507ebc660010969
http://git.kernel.org/linus/eab633021c26025b34f36f79f0311d3d99f40ceb
http://git.kernel.org/linus/ef681ce1e8b3e63317cd724c200b2fd39286c005
http://git.kernel.org/linus/59ed6eecff4aa00c5c5d18ffd180acac108d596e
http://git.kernel.org/linus/3044b8d1ff8c05237652a692fb572a34e4d70146
drivers/net/ixgb/ixgb_main.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index eb917f1..fad08ce 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -2227,6 +2227,11 @@ static pci_ers_result_t ixgb_io_error_detected(struct pci_dev *pdev,
struct net_device *netdev = pci_get_drvdata(pdev);
struct ixgb_adapter *adapter = netdev_priv(netdev);
+ netif_device_detach(netdev);
+
+ if (state == pci_channel_io_perm_failure)
+ return PCI_ERS_RESULT_DISCONNECT;
+
if (netif_running(netdev))
ixgb_down(adapter, true);
next prev parent reply other threads:[~2009-07-31 19:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-31 19:12 [net-next-2.6 PATCH 0/9] return PCI_ERS_RESULT_DISCONNECT on permanent failure Dean Nelson
2009-07-31 19:13 ` [net-next-2.6 PATCH 1/9] atl1c: " Dean Nelson
2009-07-31 19:13 ` [net-next-2.6 PATCH 2/9] atl1e: " Dean Nelson
2009-07-31 19:13 ` [net-next-2.6 PATCH 3/9] bnx2: " Dean Nelson
2009-07-31 19:13 ` [net-next-2.6 PATCH 4/9] bnx2x: " Dean Nelson
2009-07-31 19:13 ` [net-next-2.6 PATCH 5/9] igbvf: " Dean Nelson
2009-07-31 19:13 ` Dean Nelson [this message]
2009-07-31 19:44 ` [net-next-2.6 PATCH 6/9] ixgb: " Waskiewicz Jr, Peter P
2009-07-31 19:13 ` [net-next-2.6 PATCH 7/9] qlge: " Dean Nelson
2009-07-31 19:13 ` [net-next-2.6 PATCH 8/9] s2io: " Dean Nelson
2009-07-31 19:14 ` [net-next-2.6 PATCH 9/9] vxge: " Dean Nelson
2009-08-05 0:48 ` Sivakumar Subramani
2009-08-02 6:13 ` [net-next-2.6 PATCH 0/9] " David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090731191340.5470.79342.send-patch@aqua \
--to=dnelson@redhat.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=netdev@vger.kernel.org \
--cc=peter.p.waskiewicz.jr@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.