From 522b34fd640f8705350cd89dc94b74352ba461a7 Mon Sep 17 00:00:00 2001 From: jhb Date: Mon, 21 Nov 2005 19:33:23 +0000 Subject: [PATCH] MFC: If we get a source index in a _PRT entry that is not zero, assume that it is really a hard-wired IRQ and not a source index. --- sys/dev/acpica/acpi_pcib.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi_pcib.c b/sys/dev/acpica/acpi_pcib.c index 89940866a47a..bdfe70ce0433 100644 --- a/sys/dev/acpica/acpi_pcib.c +++ b/sys/dev/acpica/acpi_pcib.c @@ -96,6 +96,13 @@ prt_attach_devices(ACPI_PCI_ROUTING_TABLE *entry, void *arg) if (entry->Source == NULL || entry->Source[0] == '\0') return; + /* + * In practice, we only see SourceIndex's of 0 out in the wild. + * When indices != 0 have been found, they've been bugs in the ASL. + */ + if (entry->SourceIndex != 0) + return; + /* Lookup the associated handle and device. */ pcib = (device_t)arg; if (ACPI_FAILURE(AcpiGetHandle(ACPI_ROOT_OBJECT, entry->Source, &handle))) @@ -236,8 +243,12 @@ acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin, /* * If source is empty/NULL, the source index is a global IRQ number * and it's hard-wired so we're done. + * + * XXX: If the source index is non-zero, ignore the source device and + * assume that this is a hard-wired entry. */ - if (prt->Source == NULL || prt->Source[0] == '\0') { + if (prt->Source == NULL || prt->Source[0] == '\0' || + prt->SourceIndex != 0) { if (bootverbose) device_printf(pcib, "slot %d INT%c hardwired to IRQ %d\n", pci_get_slot(dev), 'A' + pin, prt->SourceIndex);