summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-08-07 19:52:30 +0000
committerjhb <jhb@FreeBSD.org>2006-08-07 19:52:30 +0000
commit5aad56860fd6165307c4162c63612d3bcb2e3c00 (patch)
treee925ec81f18e39494328b141df18b9e9f2f052b5 /sys/dev/acpica
parent3ac57dcacdfec213ec9ecae0d14ded92561e4579 (diff)
downloadFreeBSD-src-5aad56860fd6165307c4162c63612d3bcb2e3c00.zip
FreeBSD-src-5aad56860fd6165307c4162c63612d3bcb2e3c00.tar.gz
When a user uses a hint to specify the IRQ for a link device, accept IRQs
that aren't listed as valid in the link device's set of possible IRQs. This allows the hints to be used to work around broken BIOSes that don't specify the correct ste of possible IRQs. A warning is issued in the dmesg in this case to be consistent with the $PIR handling code. MFC after: 1 week
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/acpi_pci_link.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/sys/dev/acpica/acpi_pci_link.c b/sys/dev/acpica/acpi_pci_link.c
index 91a4f5f..bb39b29 100644
--- a/sys/dev/acpica/acpi_pci_link.c
+++ b/sys/dev/acpica/acpi_pci_link.c
@@ -941,19 +941,27 @@ acpi_pci_link_choose_irq(device_t dev, struct link *link)
KASSERT(!PCI_INTERRUPT_VALID(link->l_irq),
("%s: link already has an IRQ", __func__));
- /* Check for a tunable override and use it if it is valid. */
+ /* Check for a tunable override. */
if (ACPI_SUCCESS(acpi_short_name(acpi_get_handle(dev), link_name,
sizeof(link_name)))) {
snprintf(tunable_buffer, sizeof(tunable_buffer),
"hw.pci.link.%s.%d.irq", link_name, link->l_res_index);
- if (getenv_int(tunable_buffer, &i) &&
- PCI_INTERRUPT_VALID(i) && link_valid_irq(link, i))
+ if (getenv_int(tunable_buffer, &i) && PCI_INTERRUPT_VALID(i)) {
+ if (!link_valid_irq(link, i))
+ device_printf(dev,
+ "Warning, IRQ %d is not listed as valid\n",
+ i);
return (i);
+ }
snprintf(tunable_buffer, sizeof(tunable_buffer),
"hw.pci.link.%s.irq", link_name);
- if (getenv_int(tunable_buffer, &i) &&
- PCI_INTERRUPT_VALID(i) && link_valid_irq(link, i))
+ if (getenv_int(tunable_buffer, &i) && PCI_INTERRUPT_VALID(i)) {
+ if (!link_valid_irq(link, i))
+ device_printf(dev,
+ "Warning, IRQ %d is not listed as valid\n",
+ i);
return (i);
+ }
}
/*
OpenPOWER on IntegriCloud