]> err.no Git - linux-2.6/blobdiff - drivers/ssb/driver_pcicore.c
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
[linux-2.6] / drivers / ssb / driver_pcicore.c
index 33a7d5620474af5f51d200e1ba2587f0db9f345d..d28c53868093ce533c88e9b88a80334d9ac5ebca 100644 (file)
@@ -537,12 +537,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))) {
@@ -562,15 +562,9 @@ int ssb_pcicore_dev_irqvecs_enable(struct ssb_pcicore *pc,
                u32 intvec;
 
                intvec = ssb_read32(pdev, SSB_INTVEC);
-               if ((bus->chip_id & 0xFF00) == 0x4400) {
-                       /* Workaround: On the BCM44XX the BPFLAG routing
-                        * bit is wrong. Use a hardcoded constant. */
-                       intvec |= 0x00000002;
-               } else {
-                       tmp = ssb_read32(dev, SSB_TPSFLAG);
-                       tmp &= SSB_TPSFLAG_BPFLAG;
-                       intvec |= tmp;
-               }
+               tmp = ssb_read32(dev, SSB_TPSFLAG);
+               tmp &= SSB_TPSFLAG_BPFLAG;
+               intvec |= (1 << tmp);
                ssb_write32(pdev, SSB_INTVEC, intvec);
        }