Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[deliverable/linux.git] / drivers / acpi / pci_irq.c
index c8e169e46673ae253882872cda7a94249540c3a5..2c45dd3acc17a4f6d9248e9db7ef4b31e8dbfdb0 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/pci.h>
 #include <linux/acpi.h>
 #include <linux/slab.h>
+#include <linux/interrupt.h>
 
 #define PREFIX "ACPI: "
 
@@ -387,6 +388,23 @@ static inline int acpi_isa_register_gsi(struct pci_dev *dev)
 }
 #endif
 
+static inline bool acpi_pci_irq_valid(struct pci_dev *dev, u8 pin)
+{
+#ifdef CONFIG_X86
+       /*
+        * On x86 irq line 0xff means "unknown" or "no connection"
+        * (PCI 3.0, Section 6.2.4, footnote on page 223).
+        */
+       if (dev->irq == 0xff) {
+               dev->irq = IRQ_NOTCONNECTED;
+               dev_warn(&dev->dev, "PCI INT %c: not connected\n",
+                        pin_name(pin));
+               return false;
+       }
+#endif
+       return true;
+}
+
 int acpi_pci_irq_enable(struct pci_dev *dev)
 {
        struct acpi_prt_entry *entry;
@@ -431,11 +449,14 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
        } else
                gsi = -1;
 
-       /*
-        * No IRQ known to the ACPI subsystem - maybe the BIOS / 
-        * driver reported one, then use it. Exit in any case.
-        */
        if (gsi < 0) {
+               /*
+                * No IRQ known to the ACPI subsystem - maybe the BIOS /
+                * driver reported one, then use it. Exit in any case.
+                */
+               if (!acpi_pci_irq_valid(dev, pin))
+                       return 0;
+
                if (acpi_isa_register_gsi(dev))
                        dev_warn(&dev->dev, "PCI INT %c: no GSI\n",
                                 pin_name(pin));
This page took 0.027439 seconds and 5 git commands to generate.