Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi A small nit from the spec: _PSW should be calle...



details:   https://anonhg.NetBSD.org/src/rev/efd67e6d75fe
branches:  trunk
changeset: 755590:efd67e6d75fe
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Thu Jun 10 20:36:55 2010 +0000

description:
A small nit from the spec: _PSW should be called after _PTS. Thus call the
wakedev routine after AcpiEnterSleepStatePrep(). Unlikely to make any
difference whatsoever, but there might always be a BIOS writer who disagrees.

diffstat:

 sys/dev/acpi/acpi.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (48 lines):

diff -r 3579474420ca -r efd67e6d75fe sys/dev/acpi/acpi.c
--- a/sys/dev/acpi/acpi.c       Thu Jun 10 19:10:09 2010 +0000
+++ b/sys/dev/acpi/acpi.c       Thu Jun 10 20:36:55 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi.c,v 1.202 2010/06/07 17:13:52 jruoho Exp $        */
+/*     $NetBSD: acpi.c,v 1.203 2010/06/10 20:36:55 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.202 2010/06/07 17:13:52 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.203 2010/06/10 20:36:55 jruoho Exp $");
 
 #include "opt_acpi.h"
 #include "opt_pcifixup.h"
@@ -1425,8 +1425,6 @@
                if (ACPI_SUCCESS(rv))
                        aprint_debug_dev(sc->sc_dev, "evaluated _TTS\n");
 
-               acpi_wakedev_commit(sc, state);
-
                if (state != ACPI_STATE_S1 &&
                    pmf_system_suspend(PMF_Q_NONE) != true) {
                        aprint_error_dev(sc->sc_dev, "aborting suspend\n");
@@ -1437,7 +1435,6 @@
                 * This will evaluate the  _PTS and _SST methods,
                 * but unlike the documentation claims, not _GTS,
                 * which is evaluated in AcpiEnterSleepState().
-                *
                 * This must be called with interrupts enabled.
                 */
                rv = AcpiEnterSleepStatePrep(state);
@@ -1448,6 +1445,12 @@
                        break;
                }
 
+               /*
+                * After the _PTS method has been evaluated, we can
+                * enable wake and evaluate _PSW (ACPI 4.0, p. 284).
+                */
+               acpi_wakedev_commit(sc, state);
+
                sc->sc_sleepstate = state;
 
                if (state == ACPI_STATE_S1) {



Home | Main Index | Thread Index | Old Index