summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2008-01-21 12:43:10 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2008-01-21 12:43:10 +0000
commit759776ec7631665438dbf5880337144e265d1060 (patch)
tree24874d59c8432b53358f3b76c469e20de6651c23 /sys/dev
parent6f0a2b729e50afe86c0bbe6964fa438a0ca17541 (diff)
Check against RESET_REG_SUP in FADT before doing the acpi reset dance
after all, not doing so appears to break more machines than it fixes. ok marco@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi/acpi.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index fcab2fefb15..a81dbbc553e 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.112 2008/01/05 18:26:30 kettenis Exp $ */
+/* $OpenBSD: acpi.c,v 1.113 2008/01/21 12:43:09 jsg Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -1195,8 +1195,12 @@ acpi_reset(void)
fadt = acpi_softc->sc_fadt;
- /* FADT_RESET_REG_SUP is not properly set in some implementations */
- if (acpi_softc->sc_revision <= 1 || fadt->reset_reg.address == 0)
+ /*
+ * RESET_REG_SUP is not properly set in some implementations,
+ * but not testing against it breaks more machines than it fixes
+ */
+ if (acpi_softc->sc_revision <= 1 ||
+ !(fadt->flags & FADT_RESET_REG_SUP) || fadt->reset_reg.address == 0)
return;
value = fadt->reset_value;