summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_pcib.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-06-23 17:21:02 +0000
committerjhb <jhb@FreeBSD.org>2004-06-23 17:21:02 +0000
commitcb992566cac1c44f62a47bbee7ec9f4a2fe7db53 (patch)
tree4678bf05661b8093ed227e74131c0db158f84795 /sys/dev/acpica/acpi_pcib.c
parent22d8e1a72ee83a4d20da2cc201b27d2d2494eba5 (diff)
downloadFreeBSD-src-cb992566cac1c44f62a47bbee7ec9f4a2fe7db53.zip
FreeBSD-src-cb992566cac1c44f62a47bbee7ec9f4a2fe7db53.tar.gz
- Defer BUS_CONFIG_INTR() on ACPI IRQ resources until the resources are
actually used. For most ACPI devices this means deferring the call until bus_alloc_resource(). - Add a function acpi_config_intr() to call BUS_CONFIG_INTR() for an ACPI IRQ resource using the trigger mode and polarity information stored in the ACPI resource object. - Add a function acpi_lookup_irq_resource() to lookup the ACPI IRQ resource that corresponds to a specified rid and new-bus resource. - Have the ACPI PCI bridge driver call BUS_CONFIG_INTR() on interrupts that it routes through link devices. - Remove needactivate variable from acpi_alloc_resource() by changing the function not modify the flags variable but just mask off RF_ACTIVE when calling rman_reserve_resource(). Reviewed by: njl (1, an earlier version)
Diffstat (limited to 'sys/dev/acpica/acpi_pcib.c')
-rw-r--r--sys/dev/acpica/acpi_pcib.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_pcib.c b/sys/dev/acpica/acpi_pcib.c
index b14efb2..8eeda8e 100644
--- a/sys/dev/acpica/acpi_pcib.c
+++ b/sys/dev/acpica/acpi_pcib.c
@@ -121,6 +121,7 @@ acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin,
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
+ crsres = NULL;
buf.Pointer = NULL;
crsbuf.Pointer = NULL;
prsbuf.Pointer = NULL;
@@ -348,6 +349,7 @@ acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin,
/* XXX Data.Irq and Data.ExtendedIrq are implicitly structure-copied. */
crsbuf.Pointer = NULL;
+ crsres = NULL;
if (prsres->Id == ACPI_RSTYPE_IRQ) {
resbuf.Id = ACPI_RSTYPE_IRQ;
resbuf.Length = ACPI_SIZEOF_RESOURCE(ACPI_RESOURCE_IRQ);
@@ -378,6 +380,7 @@ acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin,
AcpiFormatException(status));
goto out;
}
+ crsres = &resbuf;
/* Return the interrupt we just routed. */
device_printf(pcib, "slot %d INT%c routed to irq %d via %s\n",
@@ -386,6 +389,8 @@ acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin,
interrupt = Interrupts[0];
out:
+ if (PCI_INTERRUPT_VALID(interrupt) && crsres != NULL)
+ acpi_config_intr(dev, crsres);
if (crsbuf.Pointer != NULL)
AcpiOsFree(crsbuf.Pointer);
if (prsbuf.Pointer != NULL)
OpenPOWER on IntegriCloud