From: kettenis Date: Tue, 7 Dec 2021 10:15:25 +0000 (+0000) Subject: Fix parsing of SR_IRQ resource descriptors. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=912c5db17db85b8dc024da9f9579b5b4cdcf784f;p=openbsd Fix parsing of SR_IRQ resource descriptors. ok patrick@, anton@ --- diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 7577424e8a2..1bf5eb134ab 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.401 2021/11/02 02:17:56 deraadt Exp $ */ +/* $OpenBSD: acpi.c,v 1.402 2021/12/07 10:15:25 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * Copyright (c) 2005 Jordan Hargrave @@ -3272,7 +3272,7 @@ acpi_parse_resources(int crsidx, union acpi_resource *crs, void *arg) case SR_IRQ: aaa->aaa_irq[aaa->aaa_nirq] = ffs(crs->sr_irq.irq_mask) - 1; /* Default is exclusive, active-high, edge triggered. */ - if (AML_CRSLEN(crs) < 3) + if (AML_CRSLEN(crs) < 4) flags = SR_IRQ_MODE; else flags = crs->sr_irq.irq_flags;