summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/acpiprt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/acpi/acpiprt.c')
-rw-r--r--sys/dev/acpi/acpiprt.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/acpi/acpiprt.c b/sys/dev/acpi/acpiprt.c
index 1bee1cfcfe4..b51669dca6d 100644
--- a/sys/dev/acpi/acpiprt.c
+++ b/sys/dev/acpi/acpiprt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpiprt.c,v 1.11 2006/12/21 19:59:02 deraadt Exp $ */
+/* $OpenBSD: acpiprt.c,v 1.12 2007/01/18 19:49:52 kettenis Exp $ */
/*
* Copyright (c) 2006 Mark Kettenis <kettenis@openbsd.org>
*
@@ -135,7 +135,7 @@ acpiprt_prt_add(struct acpiprt_softc *sc, struct aml_value *v)
struct aml_node *node;
struct aml_value res, *pp;
u_int64_t addr;
- int pin, irq, sta;
+ int pin, irq;
#if NIOAPIC > 0
struct mp_intr_map *map;
struct ioapic_softc *apic;
@@ -173,7 +173,8 @@ acpiprt_prt_add(struct acpiprt_softc *sc, struct aml_value *v)
node = pp->node;
if (aml_evalname(sc->sc_acpi, node, "_STA", 0, NULL, &res))
printf("no _STA method\n");
- sta = aml_val2int(&res);
+ if ((aml_val2int(&res) & STA_ENABLED) == 0)
+ return;
if (aml_evalname(sc->sc_acpi, node, "_CRS", 0, NULL, &res))
printf("no _CRS method\n");
@@ -189,8 +190,8 @@ acpiprt_prt_add(struct acpiprt_softc *sc, struct aml_value *v)
}
#ifdef ACPI_DEBUG
- printf("%s: %s addr 0x%llx pin %d irq %d sta %x\n",
- DEVNAME(sc), aml_nodename(pp->node), addr, pin, irq, sta);
+ printf("%s: %s addr 0x%llx pin %d irq %d\n",
+ DEVNAME(sc), aml_nodename(pp->node), addr, pin, irq);
#endif
#if NIOAPIC > 0