diff options
author | Mike Larkin <mlarkin@cvs.openbsd.org> | 2010-07-27 16:20:18 +0000 |
---|---|---|
committer | Mike Larkin <mlarkin@cvs.openbsd.org> | 2010-07-27 16:20:18 +0000 |
commit | 7159ce18741b2922c88f165522588b38c3f1e414 (patch) | |
tree | 6e8b347f99fcba291e3b78152b7f4d52e085ddbd /sys/dev | |
parent | 37b98580a950b806bfc3133aec1a891cde3f9630 (diff) |
Set the sleeping indicator light on machines that support it, in case SMI
doesn't do it for us. Shows the 'moon' LED on older Thinkpads when
sleeping.
Tested on T43p, W500, T510 by me and on X61s by deraadt@.
ok deraadt@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/acpi/acpi.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index bdad3679554..ded80a073d4 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.190 2010/07/27 05:17:36 jordan Exp $ */ +/* $OpenBSD: acpi.c,v 1.191 2010/07/27 16:20:17 mlarkin Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -1898,6 +1898,13 @@ acpi_prepare_sleep_state(struct acpi_softc *sc, int state) goto fail; } + /* Reset the indicator lights to "sleeping" */ + if (sc->sc_sst) { + env.v_integer = ACPI_SST_SLEEPING; + aml_evalnode(sc, sc->sc_sst, 1, &env, NULL); + } + env.v_integer = state; + sc->sc_state = state; /* _GTS(state) */ if (sc->sc_gts) |