From c751d2d51880d0250cf809c80a87ca69f507e5ea Mon Sep 17 00:00:00 2001 From: jruoho Date: Mon, 7 Jun 2010 04:08:26 +0000 Subject: [PATCH] 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 jmcneill@. --- sys/dev/acpi/acpi_wakedev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/acpi/acpi_wakedev.c b/sys/dev/acpi/acpi_wakedev.c index d191c624e3ac..a04f049efdd7 100644 --- a/sys/dev/acpi/acpi_wakedev.c +++ b/sys/dev/acpi/acpi_wakedev.c @@ -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 @@ -27,7 +27,7 @@ */ #include -__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 #include @@ -269,12 +269,12 @@ acpi_wakedev_gpe(struct acpi_devnode *ad, int enable, int state) 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));