#11054 NORM Not Tri: EC SCI mask not written correctly when going into suspend
Zarro Boogs per Child
bugtracker at laptop.org
Sat Jul 9 17:40:57 EDT 2011
#11054: EC SCI mask not written correctly when going into suspend
---------------------------------+------------------------------------------
Reporter: dsd | Owner: pgf
Type: defect | Status: new
Priority: normal | Milestone: Not Triaged
Component: embedded controller | Version: not specified
Keywords: | Next_action: never set
Verified: 0 | Deployment_affected:
Blockedby: | Blocking:
---------------------------------+------------------------------------------
In the XO power management code that has gone upstream, we listen for all
EC events when the system is running, but we only listen for EC events
related to devices that have wakeups requested on them when going into
suspend.
For example, during regular system operation we write a SCI mask of
EC_SCI_SRC_ALL (0x1ff), but when going into suspend, if the only device
that has wakeups requested is the keyboard/mouse, we write a SCI mask of
EC_SCI_SRC_GAME (0x01) only.
I am finding that when the suspend SCI mask is written late during the
suspend process, it causes events to be ignored that shouldn't be. It is
as if the mask is being programmed incorrectly, or is being programmed as
all-zeroes. The system simply doesn't wake up when the events occur.
However, if I run another EC command (a dummy one) immediately after, the
mask is programmed correctly. Does this highlight a strange timing
condition?
Note that under this new infrastructure, the EC mask is programmed
*really* late when we go into suspend.
Here is how you can reproduce this. Sorry that it is a bit long winded
right now.
* clone linux-next master
* here's my .config : http://dev.laptop.org/~dsd/20110709/config-xo15
* if you get a build error in mm_types.h, git revert
fc9bb8c768abe7ae10861c3510e01a95f98d5933
* apply http://dev.laptop.org/~dsd/20110709/0001-Input-enable-i8042
-level-wakeup-control.patch
* apply http://dev.laptop.org/~dsd/20110114/0015-i8042-Enable-OLPC-s-EC-
based-i8042-wakeup-control.patch
* apply http://dev.laptop.org/~dsd/20110709/0001-x86-olpc-xo15-sci-
enable-EC-wakeup-capability.patch
* build!
* if you need an easy way to boot this from USB:
http://wiki.laptop.org/go/Kernel#Boot_your_development_kernel_from_USB
Once booted, request that keyboard/mouse wakeups are enabled, and suspend:
{{{
echo -n enabled > /sys/devices/platform/i8042/power/wakeup
echo mem > /sys/power/state
}}}
Try to wake the system with keyboard/mouse - it won't wake up, but it
should have done.
Now apply this patch: http://dev.laptop.org/~dsd/20110709/0001-run-a
-dummy-command-after-setting-wakeup-mask.patch
Repeat the test, and you'll find that keyboard/mouse wakeups work fine.
--
Ticket URL: <http://dev.laptop.org/ticket/11054>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list