# \[patch 04/47\] ssb: Fix context assertion in ssb\_pcicore\_dev\_irqvecs\_enable

- Subsystems: SONICS SILICON BACKPLANE DRIVER (SSB), THE REST
- Maintainers: Michael Buesch, Linus Torvalds
- List: netdev
- 1 message, 1 author
- Page: https://ratatoskr.run/netdev/2008/06/1112708/t

## \[patch 04/47\] ssb: Fix context assertion in ssb\_pcicore\_dev\_irqvecs\_enable

- From: Greg KH \<gregkh@suse.de\>
- Date: 2008-06-14 00:13:34 
- Message: https://ratatoskr.run/netdev/2008/06/1112708.md

```text
-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Michael Buesch <redacted>

upstream commit: a3bafeedfff2ac5fa0a316bea4570e27900b6fcc

This fixes a context assertion in ssb that makes b44 print
out warnings on resume.

This fixes the following kernel oops:
http://www.kerneloops.org/oops.php?number=12732
http://www.kerneloops.org/oops.php?number=11410

Signed-off-by: Michael Buesch <redacted>
Signed-off-by: John W. Linville <redacted>
Signed-off-by: Chris Wright <redacted>

---
 drivers/ssb/driver_pcicore.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/ssb/driver_pcicore.c
+++ b/drivers/ssb/driver_pcicore.c
@@ -519,12 +519,12 @@ int ssb_pcicore_dev_irqvecs_enable(struc
 	int err = 0;
 	u32 tmp;
 
-	might_sleep();
-
 	if (!pdev)
 		goto out;
 	bus = pdev->bus;
 
+	might_sleep_if(pdev->id.coreid != SSB_DEV_PCI);
+
 	/* Enable interrupts for this device. */
 	if (bus->host_pci &&
 	    ((pdev->id.revision >= 6) || (pdev->id.coreid == SSB_DEV_PCIE))) {

-- 
```
