diff options
author | njl <njl@FreeBSD.org> | 2004-12-20 10:46:56 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2004-12-20 10:46:56 +0000 |
commit | ccf722108f25d85d65ec4732405ab51fb1991b9e (patch) | |
tree | cb31dd361ee1004dc0a3bb8a7dec3951d17d522b /sys/dev/acpica | |
parent | 835198efc59ad685b5cfbe6e3a55e5191b9b81f9 (diff) | |
download | FreeBSD-src-ccf722108f25d85d65ec4732405ab51fb1991b9e.zip FreeBSD-src-ccf722108f25d85d65ec4732405ab51fb1991b9e.tar.gz |
Only use the current value if there's one IRQ. Some systems return
multiple IRQs (which is nonsense for _CRS) when the link hasn't been
programmed. Before, this was a KASSERT. A ServerWorks system was
seen returning IRQs of 0, 2 in response to _CRS before link setup.
Thanks to sam@ for quick testing and turnaround on this.
Tested by: sam
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r-- | sys/dev/acpica/acpi_pci_link.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/acpica/acpi_pci_link.c b/sys/dev/acpica/acpi_pci_link.c index a8d34c9..3d2a9db 100644 --- a/sys/dev/acpica/acpi_pci_link.c +++ b/sys/dev/acpica/acpi_pci_link.c @@ -236,17 +236,17 @@ link_add_crs(ACPI_RESOURCE *res, void *context) link->l_res_index = req->res_index; req->link_index++; req->res_index++; + + /* + * Only use the current value if there's one IRQ. Some + * systems return multiple IRQs (which is nonsense for _CRS) + * when the link hasn't been programmed. + */ if (res->Id == ACPI_RSTYPE_IRQ) { - if (res->Data.Irq.NumberOfInterrupts > 0) { - KASSERT(res->Data.Irq.NumberOfInterrupts == 1, - ("%s: too many interrupts", __func__)); + if (res->Data.Irq.NumberOfInterrupts == 1) link->l_irq = res->Data.Irq.Interrupts[0]; - } - } else if (res->Data.ExtendedIrq.NumberOfInterrupts > 0) { - KASSERT(res->Data.ExtendedIrq.NumberOfInterrupts == 1, - ("%s: too many interrupts", __func__)); + } else if (res->Data.ExtendedIrq.NumberOfInterrupts == 1) link->l_irq = res->Data.ExtendedIrq.Interrupts[0]; - } /* * An IRQ of zero means that the link isn't routed. |