From: mlarkin Date: Tue, 27 Jul 2010 16:20:17 +0000 (+0000) Subject: Set the sleeping indicator light on machines that support it, in case SMI X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1887d54eedeb151eb2321410a9034c10b93ef5d8;p=openbsd 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@ --- 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 * Copyright (c) 2005 Jordan Hargrave @@ -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)