Module Name: src Committed By: jruoho Date: Thu Jun 10 20:36:55 UTC 2010
Modified Files: src/sys/dev/acpi: acpi.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.202 -r1.203 src/sys/dev/acpi/acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/acpi/acpi.c diff -u src/sys/dev/acpi/acpi.c:1.202 src/sys/dev/acpi/acpi.c:1.203 --- src/sys/dev/acpi/acpi.c:1.202 Mon Jun 7 17:13:52 2010 +++ src/sys/dev/acpi/acpi.c Thu Jun 10 20:36:55 2010 @@ -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) {