Bug 14112 - Pressing acpi hotkeys duing hibernation may occasionally cause EC transaction timeout
Summary: Pressing acpi hotkeys duing hibernation may occasionally cause EC transaction...
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: ACPI
Classification: Unclassified
Component: EC (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: acpi_ec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-02 17:35 UTC by Alan Jenkins
Modified: 2011-03-21 07:40 UTC (History)
2 users (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Larger extract from /var/log/messgaes (3.98 KB, application/octet-stream)
2009-09-02 17:35 UTC, Alan Jenkins
Details

Description Alan Jenkins 2009-09-02 17:35:44 UTC
Created attachment 22979 [details]
Larger extract from /var/log/messgaes

I will work on this myself - this is just a heads up - though I'm happy to give more information if requested.

I mentioned on linux-acpi that I tested the latest EC changes on my EeePC.  One test was to hammer the ACPI hotkeys during suspend and hibernation.

Looking at my logs later, this appears to have caused an error on one occasion (out of several).  I think it's most likely a pre-existing issue.  I didn't notice any ill effects, but I would still like to try and fix the error.  

[ 1331.707584] PM: Creating hibernation image: 
[ 1331.709880] PM: Need to copy 56242 pages
<hibernate/resume cycle here, I think>
[ 1331.709880] ehci_hcd 0000:00:1d.7: PME# disabled
[ 1332.203267] ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090730/evregion-424)
[ 1332.203298] ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.LID_._LID] (Node df013d80), AE_TIME
[ 1332.203381] ACPI Error (psparse-0537): Method parse/execution failed [\ATKN] (Node df0139d8), AE_TIME
[ 1332.203456] ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.SBRG.EC0_._Q11] (Node df013e70), AE_TIME

My first guess is that the suspend() method needs to wait for ongoing transactions to finish.
Comment 1 Alexey Starikovskiy 2009-09-02 19:39:10 UTC
(In reply to comment #0)
> My first guess is that the suspend() method needs to wait for ongoing
> transactions to finish.
That would be easy, just acquire ec mutex in suspend().
Comment 2 Alan Jenkins 2009-09-03 11:49:35 UTC
Thanks, that should do the trick.  It would also stop a STORMy transaction straddling the resume method and then re-enabling the GPE.

I wasn't able to reproduce the error messages, but I _have_ reproduced the resume hang a few more times.  no_console_suspend and the hung task detector showed the "lid button" resume handler was stuck - presumably in the EC driver, but it scrolled off the top of my screen.  I'll see if grabbing the mutex on resume makes it go away.

...
acpi_ex_read_data_from_field
acpi_ex_resolve_node_to_value
acpi_ex_resolve_to_value
acpi_ds_evaluate_name_path
acpi_ds_exec_end_op
acpi_ps_parse_loop
acpi_ps_parse_aml
acpi_ps_execute_method
acpi_ns_evaluate
acpi_evaluate_object
acpi_evaluate_integer
acpi_lid_send_state
acpi_button_resume
acpi_device_resume
dpm_resum_end
hibernation_snapshot
?
snapshot_ioctl
?
vfs_ioctl
do_vfs_ioctl
?
sys_ioctl
syscall_call
Comment 3 Alan Jenkins 2009-09-28 08:10:42 UTC
Patch: http://marc.info/?l=linux-acpi&m=125199222325527&w=2
Comment 4 Zhang Rui 2010-10-22 03:06:46 UTC
Alexey not longer works on EC,
Alan, what's the status of this bug? does the problem still exist in the latest upstream kernel?
Comment 5 Zhang Rui 2011-03-21 07:40:33 UTC
bug closed as there is no response from the bug reporter.
please feel free to reopen it if the bug still exists in the latest upstream kernel.

Note You need to log in before you can comment on or make changes to this bug.