netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Yuval Mintz" <yuvalmin@broadcom.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: ariele@broadcom.com, eilong@broadcom.com,
	"Yuval Mintz" <yuvalmin@broadcom.com>
Subject: [PATCH net-next 5/5] bnx2x: Allow recovery from second slot reset
Date: Wed, 24 Apr 2013 14:45:02 +0300	[thread overview]
Message-ID: <1366803902-17870-6-git-send-email-yuvalmin@broadcom.com> (raw)
In-Reply-To: <1366803902-17870-1-git-send-email-yuvalmin@broadcom.com>

As part of PCIe Advanced Error Reporting flow, if a fatal PCI error occurs,
the AER driver will cause bnx2x's PCI-core to reset. The driver's PCI error
handlers will in turn restore the PCI configuration space values by calling
`pci_restore_state'.

However, as bnx2x does not save the PCI configuration after restoration,
An additional fatal PCI error will leave the function in an unstable state
until reboot, as the registers in the PCI configuration space will contain
reset values.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 4019465..927f83a 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -12813,6 +12813,7 @@ static pci_ers_result_t bnx2x_io_slot_reset(struct pci_dev *pdev)
 
 	pci_set_master(pdev);
 	pci_restore_state(pdev);
+	pci_save_state(pdev);
 
 	if (netif_running(dev))
 		bnx2x_set_power_state(bp, PCI_D0);
-- 
1.8.1.227.g44fe835

  parent reply	other threads:[~2013-04-24 12:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-24 11:44 [PATCH net-next 0/5] bnx2x: Enhancements patch series Yuval Mintz
2013-04-24 11:44 ` [PATCH net-next 1/5] bnx2x: prevent GRO false checksum claims Yuval Mintz
2013-04-24 11:44 ` [PATCH net-next 2/5] bnx2x: Allow RX/TX pause control in autoneg Yuval Mintz
2013-04-24 11:45 ` [PATCH net-next 3/5] bnx2x: Enhance MAC configuration for VFs Yuval Mintz
2013-04-24 11:45 ` [PATCH net-next 4/5] bnx2x: Fix memory leak Yuval Mintz
2013-04-24 11:45 ` Yuval Mintz [this message]
2013-04-24 20:35 ` [PATCH net-next 0/5] bnx2x: Enhancements patch series 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=1366803902-17870-6-git-send-email-yuvalmin@broadcom.com \
    --to=yuvalmin@broadcom.com \
    --cc=ariele@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=eilong@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).