Module Name:    src
Committed By:   jruoho
Date:           Tue Jan 11 20:35:24 UTC 2011

Modified Files:
        src/sys/dev/acpi: acpi.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.229 -r1.230 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.229 src/sys/dev/acpi/acpi.c:1.230
--- src/sys/dev/acpi/acpi.c:1.229	Thu Jan  6 07:05:00 2011
+++ src/sys/dev/acpi/acpi.c	Tue Jan 11 20:35:24 2011
@@ -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;

Reply via email to