Module Name: src Committed By: jruoho Date: Mon Jun 7 04:08:26 UTC 2010
Modified Files: src/sys/dev/acpi: acpi_wakedev.c Log Message: Instead of disabling all GPEs for non-wakedevs, set both runtime and wake GPEs, but unset only wake GPEs. The old behavior was questionable, as the intention was only to disable a device's ability to wake the system. Maintaining the runtime GPE generation is more important now as ACPICA supports sharing a single GPE across multiple devices. Discussed with jmcne...@. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/dev/acpi/acpi_wakedev.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_wakedev.c diff -u src/sys/dev/acpi/acpi_wakedev.c:1.15 src/sys/dev/acpi/acpi_wakedev.c:1.16 --- src/sys/dev/acpi/acpi_wakedev.c:1.15 Sun Jun 6 18:40:51 2010 +++ src/sys/dev/acpi/acpi_wakedev.c Mon Jun 7 04:08:26 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_wakedev.c,v 1.15 2010/06/06 18:40:51 jruoho Exp $ */ +/* $NetBSD: acpi_wakedev.c,v 1.16 2010/06/07 04:08:26 jruoho Exp $ */ /*- * Copyright (c) 2009, 2010 Jared D. McNeill <jmcne...@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi_wakedev.c,v 1.15 2010/06/06 18:40:51 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_wakedev.c,v 1.16 2010/06/07 04:08:26 jruoho Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -269,12 +269,12 @@ acpi_wakedev_power(obj); /* - * Set or unset a GPE as both runtime and wake. + * Set both runtime and wake GPEs, but unset only wake GPEs. */ if (enable != 0) (void)AcpiEnableGpe(hdl, val, ACPI_GPE_TYPE_WAKE_RUN); else - (void)AcpiDisableGpe(hdl, val, ACPI_GPE_TYPE_WAKE_RUN); + (void)AcpiDisableGpe(hdl, val, ACPI_GPE_TYPE_WAKE); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "wake GPE %s for %s\n", (enable != 0) ? "enabled" : "disabled", ad->ad_name));