Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/acpi Switch the third argument to the _DSW method fr...



details:   https://anonhg.NetBSD.org/src/rev/dccc3252f7ca
branches:  trunk
changeset: 755421:dccc3252f7ca
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Sat Jun 05 15:47:59 2010 +0000

description:
Switch the third argument to the _DSW method from 3 to 0. This means that
devices should be placed in the D0 state ("fully on") after resume. We were
not prepared to handle the previous value as it implied that devices could
be placed in an arbitrary power state once in S0.

Minimal functional change, given that the _DSW is seldom seen in the field.

diffstat:

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

diffs (36 lines):

diff -r 5a6486016fa3 -r dccc3252f7ca sys/dev/acpi/acpi_wakedev.c
--- a/sys/dev/acpi/acpi_wakedev.c       Sat Jun 05 15:31:21 2010 +0000
+++ b/sys/dev/acpi/acpi_wakedev.c       Sat Jun 05 15:47:59 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_wakedev.c,v 1.13 2010/06/05 15:31:21 jruoho Exp $ */
+/* $NetBSD: acpi_wakedev.c,v 1.14 2010/06/05 15:47:59 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2009, 2010 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_wakedev.c,v 1.13 2010/06/05 15:31:21 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_wakedev.c,v 1.14 2010/06/05 15:47:59 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -170,7 +170,7 @@
 
        obj[0].Integer.Value = enable;
        obj[1].Integer.Value = state;
-       obj[2].Integer.Value = 3;
+       obj[2].Integer.Value = ACPI_STATE_D0;
 
        obj[0].Type = obj[1].Type = obj[2].Type = ACPI_TYPE_INTEGER;
 
@@ -203,7 +203,7 @@
        ACPI_BUFFER buf;
        ACPI_STATUS rv;
 
-       rv = acpi_eval_struct(ad->ad_handle, METHOD_NAME__PRW, &buf);
+       rv = acpi_eval_struct(ad->ad_handle, "_PRW", &buf);
 
        if (ACPI_FAILURE(rv))
                return;



Home | Main Index | Thread Index | Old Index