diff options
-rw-r--r-- | sys/dev/acpi/acpiprt.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/acpi/acpiprt.c b/sys/dev/acpi/acpiprt.c index 47e4cc23b8c..94abf7319de 100644 --- a/sys/dev/acpi/acpiprt.c +++ b/sys/dev/acpi/acpiprt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpiprt.c,v 1.34 2009/03/21 15:35:33 kettenis Exp $ */ +/* $OpenBSD: acpiprt.c,v 1.35 2009/03/31 20:59:00 kettenis Exp $ */ /* * Copyright (c) 2006 Mark Kettenis <kettenis@openbsd.org> * @@ -486,6 +486,12 @@ acpiprt_route_interrupt(int bus, int dev, int pin) } aml_parse_resource(res.length, res.v_buffer, acpiprt_getirq, &irq); + /* Only re-route interrupts when necessary. */ + if ((sta & STA_ENABLED) && irq == newirq) { + aml_freevalue(&res); + return; + } + crs = (union acpi_resource *)res.v_buffer; switch (AML_CRSTYPE(crs)) { case SR_IRQ: |