Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi clear fixed events and disable GPEs before re-e...
details: https://anonhg.NetBSD.org/src/rev/2bb3d1f60184
branches: trunk
changeset: 770494:2bb3d1f60184
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Tue Oct 18 23:47:26 2011 +0000
description:
clear fixed events and disable GPEs before re-enabling interrupts on resume
from S1
diffstat:
sys/dev/acpi/acpi.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r 084685be539b -r 2bb3d1f60184 sys/dev/acpi/acpi.c
--- a/sys/dev/acpi/acpi.c Tue Oct 18 23:43:36 2011 +0000
+++ b/sys/dev/acpi/acpi.c Tue Oct 18 23:47:26 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.250 2011/08/05 18:59:44 jakllsch Exp $ */
+/* $NetBSD: acpi.c,v 1.251 2011/10/18 23:47:26 jmcneill 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.250 2011/08/05 18:59:44 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.251 2011/10/18 23:47:26 jmcneill Exp $");
#include "opt_acpi.h"
#include "opt_pcifixup.h"
@@ -1386,6 +1386,17 @@
aprint_error_dev(sc->sc_dev, "failed to "
"enter S1: %s\n", AcpiFormatException(rv));
+ /*
+ * Clear fixed events and disable all GPEs before
+ * interrupts are enabled.
+ */
+ AcpiClearEvent(ACPI_EVENT_PMTIMER);
+ AcpiClearEvent(ACPI_EVENT_GLOBAL);
+ AcpiClearEvent(ACPI_EVENT_POWER_BUTTON);
+ AcpiClearEvent(ACPI_EVENT_SLEEP_BUTTON);
+ AcpiClearEvent(ACPI_EVENT_RTC);
+ AcpiHwDisableAllGpes();
+
acpi_md_OsEnableInterrupt();
rv = AcpiLeaveSleepState(state);
Home |
Main Index |
Thread Index |
Old Index