diff options
author | Mike Larkin <mlarkin@cvs.openbsd.org> | 2010-07-18 19:49:36 +0000 |
---|---|---|
committer | Mike Larkin <mlarkin@cvs.openbsd.org> | 2010-07-18 19:49:36 +0000 |
commit | 38f8bc228d97cbf1d57d93c2f3e67c28f0eb3667 (patch) | |
tree | 3fc2e8ca517b59b93502f3bd0d8014f740c72f42 /sys/dev/acpi | |
parent | 1ccb9e618981e66819b56dbf9c96a588b735f2eb (diff) |
Clear event status on resume, to avoid going back to sleep/reboot/shutdown
immediately after resume. Tested by a bunch of people on hackers@ on
various hardware. Fixes at least Toshiba NB200 and Gateway LT3103u.
ok marco
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r-- | sys/dev/acpi/acpi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index c13b734095b..5878f29104f 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.176 2010/07/13 21:01:05 deraadt Exp $ */ +/* $OpenBSD: acpi.c,v 1.177 2010/07/18 19:49:35 mlarkin Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -2096,6 +2096,10 @@ acpi_resume(struct acpi_softc *sc, int state) /* Force SCI_EN on resume to fix horribly broken machines */ acpi_write_pmreg(sc, ACPIREG_PM1_CNT, 0, ACPI_PM1_SCI_EN); + /* Clear fixed event status */ + acpi_write_pmreg(sc, ACPIREG_PM1_STS, 1, + ACPI_PM1_ALL_STS); + if (sc->sc_bfs) if (aml_evalnode(sc, sc->sc_bfs, 1, &env, NULL) != 0) { dnprintf(10, "%s evaluating method _BFS failed.\n", |