summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/acpi.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-08-04 15:22:00 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-08-04 15:22:00 +0000
commit4ff410068111e339d596986479ec7eac2fc204d3 (patch)
tree26a16929932918bdb69306f29a5f5744ee3455c6 /sys/dev/acpi/acpi.c
parent32aa8e06c852ea4387abd5b4a0a583395dcd3d86 (diff)
If we are setting ACPI_PM1_BM_RLD do it only once, and remember to
repeat this action at resume time. ok mlarkin guenther
Diffstat (limited to 'sys/dev/acpi/acpi.c')
-rw-r--r--sys/dev/acpi/acpi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index e79c9470682..2b05c37bba1 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.290 2015/07/29 18:33:17 deraadt Exp $ */
+/* $OpenBSD: acpi.c,v 1.291 2015/08/04 15:21:59 deraadt Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -2107,6 +2107,8 @@ acpi_sleep_pm(struct acpi_softc *sc, int state)
}
}
+u_int32_t acpi_force_bm;
+
void
acpi_resume_pm(struct acpi_softc *sc, int fromstate)
{
@@ -2123,7 +2125,8 @@ acpi_resume_pm(struct acpi_softc *sc, int fromstate)
acpi_write_pmreg(sc, ACPIREG_PM1B_CNT, 0, regb);
/* Force SCI_EN on resume to fix horribly broken machines */
- acpi_write_pmreg(sc, ACPIREG_PM1_CNT, 0, ACPI_PM1_SCI_EN);
+ acpi_write_pmreg(sc, ACPIREG_PM1_CNT, 0,
+ ACPI_PM1_SCI_EN | acpi_force_bm);
/* Clear fixed event status */
acpi_write_pmreg(sc, ACPIREG_PM1_STS, 0, ACPI_PM1_ALL_STS);