diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2018-01-17 12:00:24 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2018-02-02 16:50:28 -0800 |
commit | 29acc42e8e10a4721757af9ed8aec569d30ce39b (patch) | |
tree | ec5af27e25a76eae0f376029f93755032f253711 /include/linux/libps2.h | |
parent | b99e1f2a1a3f4158bed9b9e9e97ac46678d8c2ac (diff) | |
download | linux-stable-29acc42e8e10a4721757af9ed8aec569d30ce39b.tar.gz linux-stable-29acc42e8e10a4721757af9ed8aec569d30ce39b.tar.bz2 linux-stable-29acc42e8e10a4721757af9ed8aec569d30ce39b.zip |
Input: libps2 - relax command byte ACK handling
When we probe PS/2 devices we first issue "Get ID" command and only if we
receive what we consider a valid keyboard or mouse ID we disable the device
and continue with protocol detection. That means that the device may be
transmitting motion or keystroke data, while we expect ACK response.
Instead of signaling failure if we see anything but ACK/NAK let's ignore
"garbage" response until we see ACK for the command byte (first byte). The
checks for subsequent ACKs of command parameters will continue be strict.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'include/linux/libps2.h')
-rw-r--r-- | include/linux/libps2.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/libps2.h b/include/linux/libps2.h index 3c69cd796f48..5f18fe02ae37 100644 --- a/include/linux/libps2.h +++ b/include/linux/libps2.h @@ -31,6 +31,7 @@ #define PS2_FLAG_CMD1 BIT(2) /* Waiting for the first byte of command response */ #define PS2_FLAG_WAITID BIT(3) /* Command executing is GET ID */ #define PS2_FLAG_NAK BIT(4) /* Last transmission was NAKed */ +#define PS2_FLAG_ACK_CMD BIT(5) /* Waiting to ACK the command (first) byte */ struct ps2dev { struct serio *serio; |