X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/blobdiff_plain/685ca656a6e89c8498eae3a46ed4399679ab7e34..c497e9f0b4b3ac604f57a4fd66535434779418e8:/sys/bus/pci/i386/pci_pir.c diff --git a/sys/bus/pci/i386/pci_pir.c b/sys/bus/pci/i386/pci_pir.c index 5c14d5bc05..225ce99f45 100644 --- a/sys/bus/pci/i386/pci_pir.c +++ b/sys/bus/pci/i386/pci_pir.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -537,6 +538,12 @@ pci_pir_route_interrupt(int bus, int device, int func, int pin) /* Ask the BIOS to route this IRQ if we haven't done so already. */ if (!pci_link->pl_routed) { + if (machintr_legacy_intr_find(pci_link->pl_irq, + INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW) < 0) { + kprintf("$PIR: can't find irq %d\n", pci_link->pl_irq); + return PCI_INVALID_IRQ; + } + error = pci_pir_biosroute(bus, device, func, pin - 1, pci_link->pl_irq);