]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/kernel/eeh_driver.c
Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64...
[karo-tx-linux.git] / arch / powerpc / kernel / eeh_driver.c
index fdc679d309ec4c030d6f407d35675fb1b2527473..bb61ca58ca6d8272955d7023852f97cbe180c676 100644 (file)
@@ -143,13 +143,30 @@ static void eeh_disable_irq(struct pci_dev *dev)
 static void eeh_enable_irq(struct pci_dev *dev)
 {
        struct eeh_dev *edev = pci_dev_to_eeh_dev(dev);
-       struct irq_desc *desc;
 
        if ((edev->mode) & EEH_DEV_IRQ_DISABLED) {
                edev->mode &= ~EEH_DEV_IRQ_DISABLED;
-
-               desc = irq_to_desc(dev->irq);
-               if (desc && desc->depth > 0)
+               /*
+                * FIXME !!!!!
+                *
+                * This is just ass backwards. This maze has
+                * unbalanced irq_enable/disable calls. So instead of
+                * finding the root cause it works around the warning
+                * in the irq_enable code by conditionally calling
+                * into it.
+                *
+                * That's just wrong.The warning in the core code is
+                * there to tell people to fix their assymetries in
+                * their own code, not by abusing the core information
+                * to avoid it.
+                *
+                * I so wish that the assymetry would be the other way
+                * round and a few more irq_disable calls render that
+                * shit unusable forever.
+                *
+                *      tglx
+                */
+               if (irqd_irq_disabled(irq_get_irq_data(dev->irq)))
                        enable_irq(dev->irq);
        }
 }