]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ssb: Fix context assertion in ssb_pcicore_dev_irqvecs_enable
authorMichael Buesch <mb@bu3sch.de>
Sat, 7 Jun 2008 15:57:37 +0000 (17:57 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 16 Jun 2008 20:19:49 +0000 (13:19 -0700)
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 <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/ssb/driver_pcicore.c

index 5d777f211699460085572b991d3e5283314ef2f3..3c8239a1792ff763636e4f6fdb4eff8f152b77fb 100644 (file)
@@ -519,12 +519,12 @@ int ssb_pcicore_dev_irqvecs_enable(struct ssb_pcicore *pc,
        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))) {