aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/events
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2008-10-27 17:01:02 -0400
committerLen Brown <len.brown@intel.com>2008-10-28 01:53:19 -0400
commited206fac87d65917280b6c3edd3f01125d4095c9 (patch)
tree5197b6d5fbab8f78e4451320b5a1f4f06f62f404 /drivers/acpi/events
parent49fdf6785fd660e18a1eb4588928f47e9fa29a9a (diff)
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')
-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 73bfd6bf962f..211e93a90e95 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)
521 if (value) 521 if (value)
522 *event_status |= ACPI_EVENT_FLAG_SET; 522 *event_status |= ACPI_EVENT_FLAG_SET;
523 523
524 if (acpi_gbl_fixed_event_handlers[event].handler)
525 *event_status |= ACPI_EVENT_FLAG_HANDLE;
526
524 return_ACPI_STATUS(status); 527 return_ACPI_STATUS(status);
525} 528}
526 529
@@ -571,6 +574,9 @@ acpi_get_gpe_status(acpi_handle gpe_device,
571 574
572 status = acpi_hw_get_gpe_status(gpe_event_info, event_status); 575 status = acpi_hw_get_gpe_status(gpe_event_info, event_status);
573 576
577 if (gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK)
578 *event_status |= ACPI_EVENT_FLAG_HANDLE;
579
574 unlock_and_exit: 580 unlock_and_exit:
575 if (flags & ACPI_NOT_ISR) { 581 if (flags & ACPI_NOT_ISR) {
576 (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); 582 (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);