summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorkochi <kochi@NetBSD.org>2003-12-21 10:27:23 +0000
committerkochi <kochi@NetBSD.org>2003-12-21 10:27:23 +0000
commit392db58804afac0cdc01583fb50fc1ea078e2b4e (patch)
tree34e816185be56bf33ba78cc22c0afdd1d7644427 /sys/dev
parent83f8b02df295b2dc601f1f84d5d283c32a6dc244 (diff)
correct handling of _SI.SST method as it is described in ACPI spec.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi/acpica/Subsystem/hwsleep.c36
1 files changed, 34 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpica/Subsystem/hwsleep.c b/sys/dev/acpi/acpica/Subsystem/hwsleep.c
index 08a9420888f..5c6c6384f8b 100644
--- a/sys/dev/acpi/acpica/Subsystem/hwsleep.c
+++ b/sys/dev/acpi/acpica/Subsystem/hwsleep.c
@@ -116,7 +116,7 @@
*****************************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hwsleep.c,v 1.10 2003/12/21 07:51:18 kochi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hwsleep.c,v 1.11 2003/12/21 10:27:23 kochi Exp $");
#include "acpi.h"
@@ -267,6 +267,28 @@ AcpiEnterSleepStatePrep (
/* Set the system indicators to show the desired sleep state. */
+ switch (SleepState)
+ {
+ case ACPI_STATE_S0:
+ /* _SST 1: Working */
+ Arg.Integer.Value = 1;
+ break;
+ case ACPI_STATE_S1:
+ case ACPI_STATE_S2:
+ case ACPI_STATE_S3:
+ /* _SST 3: Sleeping. Used to indicate system state S1, S2 or S3. */
+ Arg.Integer.Value = 3;
+ break;
+ case ACPI_STATE_S4:
+ /* _SST 4: Sleeping with context saved to non-volatile storage. */
+ Arg.Integer.Value = 4;
+ break;
+ case ACPI_STATE_S5:
+ /* _SST 0: No system state indication. Indicator off. */
+ Arg.Integer.Value = 0;
+ break;
+ }
+
Status = AcpiEvaluateObject (NULL, "\\_SI._SST", &ArgList, NULL);
if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
{
@@ -558,7 +580,8 @@ AcpiLeaveSleepState (
/* Ignore any errors from these methods */
- Arg.Integer.Value = 0;
+ /* _SST 2: Waking */
+ Arg.Integer.Value = 2;
Status = AcpiEvaluateObject (NULL, "\\_SI._SST", &ArgList, NULL);
if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
{
@@ -589,5 +612,14 @@ AcpiLeaveSleepState (
/* Enable BM arbitration */
Status = AcpiSetRegister (ACPI_BITREG_ARB_DISABLE, 0, ACPI_MTX_LOCK);
+
+ /* _SST 1: Working */
+ Arg.Integer.Value = 1;
+ Status = AcpiEvaluateObject (NULL, "\\_SI._SST", &ArgList, NULL);
+ if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
+ {
+ ACPI_REPORT_ERROR (("Method _SST failed, %s\n", AcpiFormatException (Status)));
+ }
+
return_ACPI_STATUS (Status);
}