Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi As noted by jmcneill@, the specifications speci...
details: https://anonhg.NetBSD.org/src/rev/ea6cbc9bb291
branches: trunk
changeset: 754274:ea6cbc9bb291
user: jruoho <jruoho%NetBSD.org@localhost>
date: Sun Apr 25 17:03:08 2010 +0000
description:
As noted by jmcneill@, the specifications specifically mention that the _TTS
should be invoked before the system has notified any native mode device
drivers. Thus, do the call before pmf_system_suspend(9).
diffstat:
sys/dev/acpi/acpi.c | 34 ++++++++++++++++++----------------
1 files changed, 18 insertions(+), 16 deletions(-)
diffs (69 lines):
diff -r 0cf0dcaa5bb8 -r ea6cbc9bb291 sys/dev/acpi/acpi.c
--- a/sys/dev/acpi/acpi.c Sun Apr 25 16:10:51 2010 +0000
+++ b/sys/dev/acpi/acpi.c Sun Apr 25 17:03:08 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.189 2010/04/25 10:05:22 jruoho Exp $ */
+/* $NetBSD: acpi.c,v 1.190 2010/04/25 17:03:08 jruoho Exp $ */
/*-
* Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.189 2010/04/25 10:05:22 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.190 2010/04/25 17:03:08 jruoho Exp $");
#include "opt_acpi.h"
#include "opt_pcifixup.h"
@@ -1454,6 +1454,21 @@
break;
}
+ /*
+ * Evaluate the _TTS method. This should be done before
+ * pmf_system_suspend(9) and the evaluation of _PTS.
+ * We should also re-evaluate this once we return to
+ * S0 or if we abort the sleep state transition in the
+ * middle (see ACPI 3.0, section 7.3.6). In reality,
+ * however, the _TTS method is seldom seen in the field.
+ */
+ rv = acpi_eval_set_integer(NULL, "\\_TTS", state);
+
+ if (ACPI_SUCCESS(rv))
+ aprint_debug_dev(sc->sc_dev, "evaluated _TTS\n");
+
+ rv = AE_OK;
+
acpi_wakedev_commit(sc, state);
if (state != ACPI_STATE_S1 &&
@@ -1463,19 +1478,6 @@
}
/*
- * Evaluate the _TTS method, which should be called
- * before _PTS. We should also re-evaluate this once
- * we return to S0 (see ACPI 3.0, section 7.3.6).
- * In reality, _TTS is seldom seen in the field.
- */
- rv = acpi_eval_set_integer(NULL, "\\_TTS", state);
-
- if (ACPI_SUCCESS(rv))
- aprint_debug_dev(sc->sc_dev, "evaluated _TTS\n");
-
- rv = AE_OK;
-
- /*
* This will evaluate the _PTS and _SST methods,
* but unlike the documentation claims, not _GTS,
* which is evaluated in AcpiEnterSleepState().
@@ -1520,7 +1522,7 @@
case ACPI_STATE_S5:
- (void)acpi_eval_set_integer(NULL, "\\_TTS", state);
+ (void)acpi_eval_set_integer(NULL, "\\_TTS", ACPI_STATE_S5);
rv = AcpiEnterSleepStatePrep(ACPI_STATE_S5);
Home |
Main Index |
Thread Index |
Old Index