summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpi/acpidev.h3
-rw-r--r--sys/dev/acpi/acpiprt.c11
2 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/acpi/acpidev.h b/sys/dev/acpi/acpidev.h
index 60acfe17bb0..b8d038c78ae 100644
--- a/sys/dev/acpi/acpidev.h
+++ b/sys/dev/acpi/acpidev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpidev.h,v 1.15 2007/01/03 05:59:20 marco Exp $ */
+/* $OpenBSD: acpidev.h,v 1.16 2007/01/18 19:49:52 kettenis Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
@@ -199,6 +199,7 @@ struct acpibat_bmd {
#define HPET_TIMER2_INTERRUPT 0x510
#define STA_PRESENT (1L << 0)
+#define STA_ENABLED (1L << 1)
#define STA_BATTERY (1L << 4)
/*
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