]> git.baikalelectronics.ru Git - kernel.git/commit
x86, olpc: Wait for last byte of EC command to be accepted
authorPaul Fox <pgf@laptop.org>
Tue, 26 Jul 2011 15:42:26 +0000 (16:42 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 5 Aug 2011 21:47:55 +0000 (23:47 +0200)
commitba0c9385f4a980686976ec1e8da1e7ebb931b4a2
tree227eea7ae7604ca79d2477896df3c25150b676e9
parentd089df7c2dd167b0f1c110b5c2367cd7fe26dacc
x86, olpc: Wait for last byte of EC command to be accepted

When executing EC commands, only waiting when there are still
more bytes to write is usually fine. However, if the system
suspends very quickly after a call to olpc_ec_cmd(), the last
data byte may not yet be transferred to the EC, and the command
will not complete.

This solves a bug where the SCI wakeup mask was not correctly
written when going into suspend.

It means that sometimes, on XO-1.5 (but not XO-1), the
devices that were marked as wakeup sources can't wake up
the system. e.g. you ask for wifi wakeups, suspend, but then
incoming wifi frames don't wake up the system as they should.

Signed-off-by: Paul Fox <pgf@laptop.org>
Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Andres Salomon <dilinger@queued.net>
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/platform/olpc/olpc.c