]> Pileus Git - ~andy/linux/commit
eeepc-wmi: serialize access to wmi method
authorCorentin Chary <corentincj@iksaif.net>
Sun, 6 Feb 2011 12:28:29 +0000 (13:28 +0100)
committerMatthew Garrett <mjg@redhat.com>
Mon, 28 Mar 2011 10:05:15 +0000 (06:05 -0400)
commit279f8f95493c9aaa0a85520c863ccba87c4bf930
tree02b1b68a797e1b5094f557b92f881d090893a7ba
parentafa7c886578ce264d9b66d4bcb1fea51fac47925
eeepc-wmi: serialize access to wmi method

\AMW0.WMBC, which is the main method that we use,
is not reentrant. When wireless hotpluging is enabled,
toggling the status of the wireless device using WMBC will
trigger a notification and the notification handler need to
call WMBC again to get the new status of the device, this
will trigger the following error:

ACPI Error (dswload-0802): [_T_0] Namespace lookup failure, AE_ALREADY_EXISTS
ACPI Exception: AE_ALREADY_EXISTS, During name lookup/catalog (20100428/psloop-231)
ACPI Error (psparse-0537): Method parse/execution failed [\AMW0.WMBC] (Node f7023b88), AE_ALREADY_EXISTS
ACPI: Marking method WMBC as Serialized because of AE_ALREADY_EXISTS error

Since there is currently no way to tell the acpi subsystem to mark
a method as serialized, we do it in eeepc-wmi.

Of course, we could let the first call fail, and then it would work,
but it doesn't seems really clean, and it will make the first
WMBC call return a random value.

This patch was tested on EeePc 1000H with a RaLink RT2860
wireless card using the rt2800pci driver. rt2860sta driver
seems to deadlock when we remove the pci device...

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/eeepc-wmi.c