diff mbox

[net-2.6,3/5] bnx2x: Move to D0 before clearing MSI/MSI-X configuration.

Message ID 1294575619.31551.17.camel@lb-tlvb-vladz
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Vladislav Zolotarov Jan. 9, 2011, 12:20 p.m. UTC
Move to D0 before clearing MSI/MSI-X configuration. Otherwise MSI/MSI-X
won't be cleared.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
 drivers/net/bnx2x/bnx2x_main.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Comments

David Miller Jan. 9, 2011, 11:49 p.m. UTC | #1
From: "Vladislav Zolotarov" <vladz@broadcom.com>
Date: Sun, 9 Jan 2011 14:20:19 +0200

> Move to D0 before clearing MSI/MSI-X configuration. Otherwise MSI/MSI-X
> won't be cleared.
> 
> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index 2689f02..78cb2e0 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -9106,9 +9106,15 @@  static void __devexit bnx2x_remove_one(struct pci_dev *pdev)
 	/* Delete all NAPI objects */
 	bnx2x_del_all_napi(bp);
 
+	/* Power on: we can't let PCI layer write to us while we are in D3 */
+	bnx2x_set_power_state(bp, PCI_D0);
+
 	/* Disable MSI/MSI-X */
 	bnx2x_disable_msi(bp);
 
+	/* Power off */
+	bnx2x_set_power_state(bp, PCI_D3hot);
+
 	/* Make sure RESET task is not scheduled before continuing */
 	cancel_delayed_work_sync(&bp->reset_task);