* Patch: enable runtime GPEs before calling _WAK method
@ 2005-03-27 0:34 Matthew Garrett
2005-03-30 6:58 ` Yu, Luming
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Garrett @ 2005-03-27 0:34 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
The following patch enables runtime GPEs before calling _WAK. This
appears to be needed for resume from disk to work properly on an HP 6220
- without it, if the fan state has changed between suspend and resume,
kacpid consumes 100% of the CPU time and the fan speed remains constant.
>From playing with this, I assume that it's because the _WAK method
triggers an event that isn't handled because the GPEs haven't been
enabled.
diff -ur build-386/drivers/acpi/hardware/hwsleep.c build-686/drivers/acpi/hardware/hwsleep.c
--- build-386/drivers/acpi/hardware/hwsleep.c 2005-03-17 20:40:58.000000000 +0000
+++ build-686/drivers/acpi/hardware/hwsleep.c 2005-03-26 23:48:29.000000000 +0000
@@ -543,12 +543,6 @@
ACPI_REPORT_ERROR (("Method _BFS failed, %s\n", acpi_format_exception (status)));
}
- status = acpi_evaluate_object (NULL, METHOD_NAME__WAK, &arg_list, NULL);
- if (ACPI_FAILURE (status) && status != AE_NOT_FOUND) {
- ACPI_REPORT_ERROR (("Method _WAK failed, %s\n", acpi_format_exception (status)));
- }
- /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */
-
/*
* Restore the GPEs:
* 1) Disable/Clear all GPEs
@@ -565,6 +559,12 @@
return_ACPI_STATUS (status);
}
+ status = acpi_evaluate_object (NULL, METHOD_NAME__WAK, &arg_list, NULL);
+ if (ACPI_FAILURE (status) && status != AE_NOT_FOUND) {
+ ACPI_REPORT_ERROR (("Method _WAK failed, %s\n", acpi_format_exception (status)));
+ }
+ /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */
+
/* Enable power button */
(void) acpi_set_register(acpi_gbl_fixed_event_info[ACPI_EVENT_POWER_BUTTON].enable_register_id,
--
Matthew Garrett | mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Patch: enable runtime GPEs before calling _WAK method
2005-03-27 0:34 Patch: enable runtime GPEs before calling _WAK method Matthew Garrett
@ 2005-03-30 6:58 ` Yu, Luming
0 siblings, 0 replies; 2+ messages in thread
From: Yu, Luming @ 2005-03-30 6:58 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Matthew Garrett
It's very likely. But we still need to dig more from DSDT.
Ususally, we are confused by interpreter glitch, so we need to make sure
interpreter works well.
On Sunday 27 March 2005 08:34, Matthew Garrett wrote:
> The following patch enables runtime GPEs before calling _WAK. This
> appears to be needed for resume from disk to work properly on an HP 6220
> - without it, if the fan state has changed between suspend and resume,
> kacpid consumes 100% of the CPU time and the fan speed remains constant.
>
> >From playing with this, I assume that it's because the _WAK method
>
> triggers an event that isn't handled because the GPEs haven't been
> enabled.
>
> diff -ur build-386/drivers/acpi/hardware/hwsleep.c
> build-686/drivers/acpi/hardware/hwsleep.c ---
> build-386/drivers/acpi/hardware/hwsleep.c 2005-03-17 20:40:58.000000000
> +0000 +++ build-686/drivers/acpi/hardware/hwsleep.c 2005-03-26
> 23:48:29.000000000 +0000 @@ -543,12 +543,6 @@
> ACPI_REPORT_ERROR (("Method _BFS failed, %s\n", acpi_format_exception
> (status))); }
>
> - status = acpi_evaluate_object (NULL, METHOD_NAME__WAK, &arg_list, NULL);
> - if (ACPI_FAILURE (status) && status != AE_NOT_FOUND) {
> - ACPI_REPORT_ERROR (("Method _WAK failed, %s\n", acpi_format_exception
> (status))); - }
> - /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */
> -
> /*
> * Restore the GPEs:
> * 1) Disable/Clear all GPEs
> @@ -565,6 +559,12 @@
> return_ACPI_STATUS (status);
> }
>
> + status = acpi_evaluate_object (NULL, METHOD_NAME__WAK, &arg_list, NULL);
> + if (ACPI_FAILURE (status) && status != AE_NOT_FOUND) {
> + ACPI_REPORT_ERROR (("Method _WAK failed, %s\n", acpi_format_exception
> (status))); + }
> + /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */
> +
> /* Enable power button */
>
> (void)
> acpi_set_register(acpi_gbl_fixed_event_info[ACPI_EVENT_POWER_BUTTON].enable
>_register_id,
--
Thanks,
Luming
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-03-30 6:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-27 0:34 Patch: enable runtime GPEs before calling _WAK method Matthew Garrett
2005-03-30 6:58 ` Yu, Luming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox