diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2023-05-11 11:52:47 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2023-05-18 11:40:32 -0700 |
commit | f219050af06d83f436945880fc9c04db3bb2860f (patch) | |
tree | 15fc405c51ca7f56688a7fa4db72baa4b8fa83c0 /scripts/gdb/linux/proc.py | |
parent | c4c7eac8ee78d896635ce05d7a1c3f813fcbe24c (diff) |
Input: libps2 - do not discard non-ack bytes when controlling LEDs
Upon receiving a PS/2 command the device and controller are supposed to
stop sending normal data (scancodes or movement packets) and instead
immediately start delivering ACK/NAK and command response. Unfortunately
often EC has an output buffer which may contain latched data by the time
the EC receives a command from the host. The kernel used to ignore such
data, but that may cause "stuck" keys if the data dropped happens to be a
break code or a part of a break code. This occasionally happens, for
example, on Chromebooks when the kernel tries to toggle CapsLock LED on
a keyboard while user releases Alt+Search keyboard shortcut.
Fix this by passing the first non-ACK byte to the normal handler for a
handful of PS/2 commands that are expected to be used during normal device
operation (as opposed to probe/configuration time).
Reviewed-by: Raul E Rangel <rrangel@chromium.org>
Link: https://lore.kernel.org/r/20230511185252.386941-8-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'scripts/gdb/linux/proc.py')
0 files changed, 0 insertions, 0 deletions