]> git.baikalelectronics.ru Git - kernel.git/commit
dell-wmi: Process only one event on devices with interface version 0
authorPali Rohár <pali.rohar@gmail.com>
Mon, 4 Jan 2016 21:26:36 +0000 (22:26 +0100)
committerDarren Hart <dvhart@linux.intel.com>
Wed, 20 Jan 2016 01:35:48 +0000 (17:35 -0800)
commit722a0019796eb3246a5640e5d9ea1c32694103f8
treebbbf6a94fdeb7f51e3182a14cb1fdbec778df62f
parent3b971b1cf16d4467d7da70fa87d6557ee44fddc5
dell-wmi: Process only one event on devices with interface version 0

BIOS/ACPI on devices with WMI interface version 0 does not clear buffer
before filling it. So next time when BIOS/ACPI send WMI event which is
smaller as previous then it contains garbage in buffer from previous event.

BIOS/ACPI on devices with WMI interface version 1 clears buffer and
sometimes send more events in buffer at one call.

Since commit 5f5cd34284ca ("dell-wmi: Update code for processing WMI
events") dell-wmi process all events in buffer (and not just first).

To prevent reading garbage from the buffer we process only the first
event on devices with WMI interface version 0.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Tested-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
drivers/platform/x86/dell-wmi.c