Skip to contentSkip to conversation

bnx2x: More Shutdown revisions

PATCH Applied Yuval Mintz 2 participants 2 messages Jan 27, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bnx2x: More Shutdown revisions

Submission d9aee59 "bnx2x: Don't release PCI bars on shutdown" separated the PCI remove and shutdown flows, but pci_disable_device() is still being called on both.
As a result, a dev_WARN_ONCE will be hit during shutdown for every bnx2x VF probed on a hypervisor (as its shutdown callback will be called and later pci_disable_sriov() will call its remove callback).

This calls the pci_disable_device() only on the remove flow.

---
Hi Dave,

Please consider applying this to `net' (or possibly net-next; not sure exactly how things currently work).

Thanks,
Yuval

---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +2 -2
index e118a3e..c9c445e 100644
@@ -13102,9 +13102,9 @@ static void __bnx2x_remove(struct pci_dev *pdev,
 
 		if (atomic_read(&pdev->enable_cnt) == 1)
 			pci_release_regions(pdev);
-	}
 
-	pci_disable_device(pdev);
+		pci_disable_device(pdev);
+	}
 }
 
 static void bnx2x_remove_one(struct pci_dev *pdev)
Signature · 1 line
1.8.1.227.g44fe835
maintainer Applied
#1 lore raw

From: Yuval Mintz <[email protected]>
Date: Mon, 27 Jan 2014 17:11:58 +0200

Quoted 11 lines

Submission d9aee59 "bnx2x: Don't release PCI bars on shutdown" separated the PCI remove and shutdown flows, but pci_disable_device() is still being called on both.
As a result, a dev_WARN_ONCE will be hit during shutdown for every bnx2x VF probed on a hypervisor (as its shutdown callback will be called and later pci_disable_sriov() will call its remove callback).

This calls the pci_disable_device() only on the remove flow.

Applied.