netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dean Nelson <dnelson@redhat.com>
To: netdev@vger.kernel.org
Cc: Michael Chan <mchan@broadcom.com>
Subject: [net-next-2.6 PATCH 3/9] bnx2: return PCI_ERS_RESULT_DISCONNECT on permanent failure
Date: Fri, 31 Jul 2009 15:13:18 -0400	[thread overview]
Message-ID: <20090731191317.5470.74252.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 bnx2.

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

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index b70cc99..7bdefe2 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -8188,6 +8188,11 @@ static pci_ers_result_t bnx2_io_error_detected(struct pci_dev *pdev,
 	rtnl_lock();
 	netif_device_detach(dev);
 
+	if (state == pci_channel_io_perm_failure) {
+		rtnl_unlock();
+		return PCI_ERS_RESULT_DISCONNECT;
+	}
+
 	if (netif_running(dev)) {
 		bnx2_netif_stop(bp);
 		del_timer_sync(&bp->timer);

  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 ` Dean Nelson [this message]
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 ` [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=20090731191317.5470.74252.send-patch@aqua \
    --to=dnelson@redhat.com \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    /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).