From 2217ce5fdc6643c7f12e2c035f8cd208950cf2fa Mon Sep 17 00:00:00 2001 From: njl Date: Thu, 18 Mar 2004 02:33:58 +0000 Subject: Support the DPF (start dependent function) resource type in parsing _PRS. This should fix this error people get attaching cardbus controllers: pcib0: _PRS resource entry has unsupported type 2 --- sys/dev/acpica/acpi_pcib.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/acpica/acpi_pcib.c b/sys/dev/acpica/acpi_pcib.c index 065d5a6..3bf39c7 100644 --- a/sys/dev/acpica/acpi_pcib.c +++ b/sys/dev/acpica/acpi_pcib.c @@ -287,16 +287,28 @@ acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin, device_printf(pcib, "device has no routed interrupt and no _PRS on PCI interrupt link device\n"); goto out; } - if (ACPI_FAILURE(acpi_FindIndexedResource(&prsbuf, prt->SourceIndex, &prsres))) { - device_printf(pcib, "_PRS buffer corrupt, cannot route interrupt\n"); - goto out; - } - /* type-check the resource we've got */ - if (prsres->Id != ACPI_RSTYPE_IRQ && prsres->Id != ACPI_RSTYPE_EXT_IRQ) { - device_printf(pcib, "_PRS resource entry has unsupported type %d\n", - prsres->Id); - goto out; + /* + * Search through the _PRS resources, looking for an IRQ or extended + * IRQ resource. Skip dependent function resources for now. In the + * future, we might use these for priority but this is good enough for + * now until BIOS vendors actually mean something by using them. + */ + for (i = prt->SourceIndex; ; i++) { + if (ACPI_FAILURE(acpi_FindIndexedResource(&prsbuf, i, &prsres))) { + device_printf(pcib, "_PRS lacks IRQ resource, routing failed\n"); + goto out; + } + switch (prsres->Id) { + case ACPI_RSTYPE_IRQ: + case ACPI_RSTYPE_EXT_IRQ: + break; + case ACPI_RSTYPE_START_DPF: + continue; + default: + device_printf(pcib, "_PRS has invalid type %d\n", prsres->Id); + goto out; + } } /* set variables based on resource type */ @@ -373,4 +385,3 @@ acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin, /* XXX APIC_IO interrupt mapping? */ return_VALUE(interrupt); } - -- cgit v1.1