Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/acpi Disable all GPEs when entering S5. Also add a c...



details:   https://anonhg.NetBSD.org/src/rev/307773d2fee8
branches:  trunk
changeset: 760719:307773d2fee8
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Tue Jan 11 20:35:24 2011 +0000

description:
Disable all GPEs when entering S5. Also add a comment that the function
acpi_enter_sleep_state() must be called with interrupts enabled.

diffstat:

 sys/dev/acpi/acpi.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r 7e2b3d1f5552 -r 307773d2fee8 sys/dev/acpi/acpi.c
--- a/sys/dev/acpi/acpi.c       Tue Jan 11 18:25:25 2011 +0000
+++ b/sys/dev/acpi/acpi.c       Tue Jan 11 20:35:24 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi.c,v 1.229 2011/01/06 07:05:00 jruoho Exp $        */
+/*     $NetBSD: acpi.c,v 1.230 2011/01/11 20:35:24 jruoho Exp $        */
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -100,7 +100,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.229 2011/01/06 07:05:00 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.230 2011/01/11 20:35:24 jruoho Exp $");
 
 #include "opt_acpi.h"
 #include "opt_pcifixup.h"
@@ -1262,6 +1262,9 @@
        }
 }
 
+/*
+ * Must be called with interrupts enabled.
+ */
 void
 acpi_enter_sleep_state(int state)
 {
@@ -1376,6 +1379,8 @@
                        break;
                }
 
+               (void)AcpiDisableAllGpes();
+
                DELAY(1000000);
 
                sc->sc_sleepstate = state;



Home | Main Index | Thread Index | Old Index