summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/events/evxfevnt.c
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2008-10-27 14:01:02 -0700
committerLen Brown <len.brown@intel.com>2008-10-28 01:53:19 -0400
commited206fac87d65917280b6c3edd3f01125d4095c9 (patch)
tree5197b6d5fbab8f78e4451320b5a1f4f06f62f404 /drivers/acpi/events/evxfevnt.c
parent49fdf6785fd660e18a1eb4588928f47e9fa29a9a (diff)
downloadop-kernel-dev-ed206fac87d65917280b6c3edd3f01125d4095c9.zip
op-kernel-dev-ed206fac87d65917280b6c3edd3f01125d4095c9.tar.gz
ACPI: bugfix reporting of event handler status
Introduce a new flag showing whether the event has an event handler/method. For all the GPEs and Fixed Events, 1. ACPI_EVENT_FLAG_HANDLE is cleared, it's an "invalid" ACPI event. 2. Both ACPI_EVENT_FLAG_HANDLE and ACPI_EVENT_FLAG_DISABLE are set, it's "disabled". 3. Both ACPI_EVENT_FLAG_HANDLE and ACPI_EVENT_FLAG_ENABLE are set, it's "enabled". 4. Both ACPI_EVENT_FLAG_HANDLE and ACPI_EVENT_FLAG_WAKE_ENABLE are set, it's "wake_enabled". Among other things, this prevents incorrect reporting of ACPI events as being "invalid" when it's really just (temporarily) "disabled". Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/events/evxfevnt.c')
-rw-r--r--drivers/acpi/events/evxfevnt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c
index 73bfd6b..211e93a 100644
--- a/drivers/acpi/events/evxfevnt.c
+++ b/drivers/acpi/events/evxfevnt.c
@@ -521,6 +521,9 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
if (value)
*event_status |= ACPI_EVENT_FLAG_SET;
+ if (acpi_gbl_fixed_event_handlers[event].handler)
+ *event_status |= ACPI_EVENT_FLAG_HANDLE;
+
return_ACPI_STATUS(status);
}
@@ -571,6 +574,9 @@ acpi_get_gpe_status(acpi_handle gpe_device,
status = acpi_hw_get_gpe_status(gpe_event_info, event_status);
+ if (gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK)
+ *event_status |= ACPI_EVENT_FLAG_HANDLE;
+
unlock_and_exit:
if (flags & ACPI_NOT_ISR) {
(void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
OpenPOWER on IntegriCloud