From: kettenis Date: Tue, 7 Dec 2021 10:16:50 +0000 (+0000) Subject: Fix parsing of SR_IRQ resource descriptors here as well. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f7acadf07da4eb9674b34317e8f4865443cc292f;p=openbsd Fix parsing of SR_IRQ resource descriptors here as well. ok patrick@, anton@ --- diff --git a/sys/dev/acpi/dwiic_acpi.c b/sys/dev/acpi/dwiic_acpi.c index 0c9b25e0956..528f1734f0e 100644 --- a/sys/dev/acpi/dwiic_acpi.c +++ b/sys/dev/acpi/dwiic_acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dwiic_acpi.c,v 1.16 2020/08/22 22:29:28 kettenis Exp $ */ +/* $OpenBSD: dwiic_acpi.c,v 1.17 2021/12/07 10:16:50 kettenis Exp $ */ /* * Synopsys DesignWare I2C controller * @@ -204,7 +204,7 @@ dwiic_acpi_parse_crs(int crsidx, union acpi_resource *crs, void *arg) case SR_IRQ: sc_crs->irq_int = ffs(letoh16(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;