netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dean Nelson <dnelson@redhat.com>
To: netdev@vger.kernel.org
Cc: Ramkrishna Vepa <ram.vepa@neterion.com>
Subject: [net-next-2.6 PATCH 9/9] vxge: return PCI_ERS_RESULT_DISCONNECT on permanent failure
Date: Fri, 31 Jul 2009 15:14:03 -0400	[thread overview]
Message-ID: <20090731191403.5470.68576.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 vxge.

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/vxge/vxge-main.c   |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 7b5402b..335140d 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -3956,6 +3956,9 @@ static pci_ers_result_t vxge_io_error_detected(struct pci_dev *pdev,
 
 	netif_device_detach(netdev);
 
+	if (state == pci_channel_io_perm_failure)
+		return PCI_ERS_RESULT_DISCONNECT;
+
 	if (netif_running(netdev)) {
 		/* Bring down the card, while avoiding PCI I/O */
 		do_vxge_close(netdev, 0);

  parent reply	other threads:[~2009-07-31 19:15 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 ` [net-next-2.6 PATCH 6/9] ixgb: " Dean Nelson
2009-07-31 19:44   ` 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 ` Dean Nelson [this message]
2009-08-05  0:48   ` [net-next-2.6 PATCH 9/9] vxge: " 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=20090731191403.5470.68576.send-patch@aqua \
    --to=dnelson@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=ram.vepa@neterion.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).