summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2021-12-07 10:16:51 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2021-12-07 10:16:51 +0000
commit95ca55791b94a812e0e6c7c3fdaeeff0d971be86 (patch)
treeae4acfd54b4b98a9ab61f6729169f71633656889
parentdc10b7850dae73ae8db181de5c5650274da52c6c (diff)
Fix parsing of SR_IRQ resource descriptors here as well.
ok patrick@, anton@
-rw-r--r--sys/dev/acpi/dwiic_acpi.c4
1 files changed, 2 insertions, 2 deletions
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;