summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-12-05 19:50:00 +0000
committerjhb <jhb@FreeBSD.org>2005-12-05 19:50:00 +0000
commitd43d34a8bd7030a93475f827ba37de574120a9bc (patch)
tree95105d111d1f59d5b4700f013a6078bf65b3b233 /sys/dev/acpica
parent257abc1fc19ce02c432c0baa7af260a50a02dfe3 (diff)
downloadFreeBSD-src-d43d34a8bd7030a93475f827ba37de574120a9bc.zip
FreeBSD-src-d43d34a8bd7030a93475f827ba37de574120a9bc.tar.gz
If pci_link has been disabled via the acpi_disable tunable, then bail
immediately from acpi_pci_link_route_interrupt() since we aren't going to have a valid pci_link device to talk to try to route interrupts. This fixes a page fault if you disable just pci_link. Note that trying to use ACPI without pci_link is probably not advised however. MFC after: 1 week Tested by: Eugene Grosbein eugen at kuzbass dot ru
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/acpi_pci_link.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_pci_link.c b/sys/dev/acpica/acpi_pci_link.c
index 5b73edb..4b7415b 100644
--- a/sys/dev/acpica/acpi_pci_link.c
+++ b/sys/dev/acpica/acpi_pci_link.c
@@ -1011,6 +1011,9 @@ acpi_pci_link_route_interrupt(device_t dev, int index)
{
struct link *link;
+ if (acpi_disabled("pci_link"))
+ return (PCI_INVALID_IRQ);
+
ACPI_SERIAL_BEGIN(pci_link);
link = acpi_pci_link_lookup(dev, index);
if (link == NULL)
OpenPOWER on IntegriCloud