Input: libps2 - relax command byte ACK handling
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 17 Jan 2018 20:00:24 +0000 (12:00 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 3 Feb 2018 00:50:28 +0000 (16:50 -0800)
commit29acc42e8e10a4721757af9ed8aec569d30ce39b
treeec5af27e25a76eae0f376029f93755032f253711
parentb99e1f2a1a3f4158bed9b9e9e97ac46678d8c2ac
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>
drivers/input/serio/libps2.c
include/linux/libps2.h