Skip to contentSkip to conversation

ssb: Fix context assertion in ssb_pcicore_dev_irqvecs_enable

PATCH New Michael Buesch 1 participant 1 message Jun 7, 2008

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

PATCH 1/1 ssb: Fix context assertion in ssb_pcicore_dev_irqvecs_enable

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

Upstream commit is a3bafeedfff2ac5fa0a316bea4570e27900b6fcc

drivers/ssb/driver_pcicore.c +2 -2
Index: linux-2.6.25.4/drivers/ssb/driver_pcicore.c
===================================================================
@@ -516,18 +516,18 @@ int ssb_pcicore_dev_irqvecs_enable(struc
 {
 	struct ssb_device *pdev = pc->dev;
 	struct ssb_bus *bus;
 	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))) {
 		u32 coremask;
 
 		/* Calculate the "coremask" for the device. */