netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2 net-next] bnx2: Enable AER on PCIE devices only
       [not found] <1286494973-5115-1-git-send-email-mchan@broadcom.com>
@ 2010-10-07 23:42 ` Michael Chan
  2010-10-11 23:12   ` David Miller
  2010-10-11 23:12 ` [PATCH 1/2 net-next] bnx2: Update firmware to 6.0.x David Miller
  1 sibling, 1 reply; 3+ messages in thread
From: Michael Chan @ 2010-10-07 23:42 UTC (permalink / raw)
  To: davem; +Cc: netdev

To prevent unnecessary error message.  pci_save_state() is also moved to
the end of ->probe() so that all PCI config, including AER state, will be
saved.

Update version to 2.0.18.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <mchan@broadcom.com>
---
 drivers/net/bnx2.c |   36 ++++++++++++++++++++++--------------
 1 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 56f3dfe..ae894bc 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -59,8 +59,8 @@
 #include "bnx2_fw.h"
 
 #define DRV_MODULE_NAME		"bnx2"
-#define DRV_MODULE_VERSION	"2.0.17"
-#define DRV_MODULE_RELDATE	"July 18, 2010"
+#define DRV_MODULE_VERSION	"2.0.18"
+#define DRV_MODULE_RELDATE	"Oct 7, 2010"
 #define FW_MIPS_FILE_06		"bnx2/bnx2-mips-06-6.0.15.fw"
 #define FW_RV2P_FILE_06		"bnx2/bnx2-rv2p-06-6.0.15.fw"
 #define FW_MIPS_FILE_09		"bnx2/bnx2-mips-09-6.0.17.fw"
@@ -7915,16 +7915,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
 		goto err_out_disable;
 	}
 
-	/* AER (Advanced Error Reporting) hooks */
-	err = pci_enable_pcie_error_reporting(pdev);
-	if (err) {
-		dev_err(&pdev->dev, "pci_enable_pcie_error_reporting failed "
-				    "0x%x\n", err);
-		/* non-fatal, continue */
-	}
-
 	pci_set_master(pdev);
-	pci_save_state(pdev);
 
 	bp->pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM);
 	if (bp->pm_cap == 0) {
@@ -7979,6 +7970,15 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
 		bp->flags |= BNX2_FLAG_PCIE;
 		if (CHIP_REV(bp) == CHIP_REV_Ax)
 			bp->flags |= BNX2_FLAG_JUMBO_BROKEN;
+
+		/* AER (Advanced Error Reporting) hooks */
+		err = pci_enable_pcie_error_reporting(pdev);
+		if (err) {
+			dev_err(&pdev->dev, "pci_enable_pcie_error_reporting "
+					    "failed 0x%x\n", err);
+			/* non-fatal, continue */
+		}
+
 	} else {
 		bp->pcix_cap = pci_find_capability(pdev, PCI_CAP_ID_PCIX);
 		if (bp->pcix_cap == 0) {
@@ -8235,16 +8235,20 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
 	bp->timer.data = (unsigned long) bp;
 	bp->timer.function = bnx2_timer;
 
+	pci_save_state(pdev);
+
 	return 0;
 
 err_out_unmap:
+	if (bp->flags & BNX2_FLAG_PCIE)
+		pci_disable_pcie_error_reporting(pdev);
+
 	if (bp->regview) {
 		iounmap(bp->regview);
 		bp->regview = NULL;
 	}
 
 err_out_release:
-	pci_disable_pcie_error_reporting(pdev);
 	pci_release_regions(pdev);
 
 err_out_disable:
@@ -8434,9 +8438,10 @@ bnx2_remove_one(struct pci_dev *pdev)
 
 	kfree(bp->temp_stats_blk);
 
-	free_netdev(dev);
+	if (bp->flags & BNX2_FLAG_PCIE)
+		pci_disable_pcie_error_reporting(pdev);
 
-	pci_disable_pcie_error_reporting(pdev);
+	free_netdev(dev);
 
 	pci_release_regions(pdev);
 	pci_disable_device(pdev);
@@ -8550,6 +8555,9 @@ static pci_ers_result_t bnx2_io_slot_reset(struct pci_dev *pdev)
 	}
 	rtnl_unlock();
 
+	if (!(bp->flags & BNX2_FLAG_PCIE))
+		return result;
+
 	err = pci_cleanup_aer_uncorrect_error_status(pdev);
 	if (err) {
 		dev_err(&pdev->dev,
-- 
1.6.4.GIT



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2 net-next] bnx2: Update firmware to 6.0.x.
       [not found] <1286494973-5115-1-git-send-email-mchan@broadcom.com>
  2010-10-07 23:42 ` [PATCH 2/2 net-next] bnx2: Enable AER on PCIE devices only Michael Chan
@ 2010-10-11 23:12 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2010-10-11 23:12 UTC (permalink / raw)
  To: mchan; +Cc: netdev

From: "Michael Chan" <mchan@broadcom.com>
Date: Thu, 7 Oct 2010 16:42:52 -0700

> - Improved flow control and simplified interface
> - Use hardware RSS indirection table instead of the slower firmware-
>   based table
> - Lower latency interrupt on 5709
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>
> Reviewed-by: Benjamin Li <benli@broadcom.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2 net-next] bnx2: Enable AER on PCIE devices only
  2010-10-07 23:42 ` [PATCH 2/2 net-next] bnx2: Enable AER on PCIE devices only Michael Chan
@ 2010-10-11 23:12   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2010-10-11 23:12 UTC (permalink / raw)
  To: mchan; +Cc: netdev

From: "Michael Chan" <mchan@broadcom.com>
Date: Thu, 7 Oct 2010 16:42:53 -0700

> To prevent unnecessary error message.  pci_save_state() is also moved to
> the end of ->probe() so that all PCI config, including AER state, will be
> saved.
> 
> Update version to 2.0.18.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>
> Reviewed-by: Benjamin Li <mchan@broadcom.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-11 23:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1286494973-5115-1-git-send-email-mchan@broadcom.com>
2010-10-07 23:42 ` [PATCH 2/2 net-next] bnx2: Enable AER on PCIE devices only Michael Chan
2010-10-11 23:12   ` David Miller
2010-10-11 23:12 ` [PATCH 1/2 net-next] bnx2: Update firmware to 6.0.x David Miller

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).