Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi As we add a handler for the ACPI fixed feature ...
details: https://anonhg.NetBSD.org/src/rev/73767f31ab42
branches: trunk
changeset: 767981:73767f31ab42
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Fri Aug 05 18:27:48 2011 +0000
description:
As we add a handler for the ACPI fixed feature button events,
ensure they aren't going to trigger as soon as we enable interrupts,
furthermore ensure that the event is unmasked.
diffstat:
sys/dev/acpi/acpi.c | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diffs (45 lines):
diff -r 2808d8efccda -r 73767f31ab42 sys/dev/acpi/acpi.c
--- a/sys/dev/acpi/acpi.c Fri Aug 05 14:43:41 2011 +0000
+++ b/sys/dev/acpi/acpi.c Fri Aug 05 18:27:48 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.248 2011/08/01 11:25:59 jmcneill Exp $ */
+/* $NetBSD: acpi.c,v 1.249 2011/08/05 18:27:48 jakllsch 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.248 2011/08/01 11:25:59 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.249 2011/08/05 18:27:48 jakllsch Exp $");
#include "opt_acpi.h"
#include "opt_pcifixup.h"
@@ -1185,11 +1185,25 @@
aprint_debug_dev(sc->sc_dev, "fixed %s button present\n",
(type != ACPI_EVENT_SLEEP_BUTTON) ? "power" : "sleep");
+ rv = AcpiClearEvent(event)
+ if (ACPI_FAILURE(rv)) {
+ aprint_error_dev(sc->sc_dev,
+ "fixed event %d did not clear: %s\n",
+ event, AcpiFormatException(rv));
+ }
+
+ rv = AcpiEnableEvent(event, 0))
+ if (ACPI_FAILURE(rv)) {
+ aprint_error_dev(sc->sc_dev,
+ "fixed event %d did not enable: %s\n",
+ event, AcpiFormatException(rv));
+ }
+
return;
fail:
aprint_error_dev(sc->sc_dev, "failed to register "
- "fixed event: %s\n", AcpiFormatException(rv));
+ "fixed event %d: %s\n", event, AcpiFormatException(rv));
}
static void
Home |
Main Index |
Thread Index |
Old Index