Skip to content

Commit 1db0fd2

Browse files
committed
Input: libps2 - fix NAK handling
Do not try to process "resend" or "reject" responses from the device as normal response data for a command. Reviewed-by: Raul E Rangel <rrangel@chromium.org> Link: https://lore.kernel.org/r/20230511185252.386941-5-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent df9fe0e commit 1db0fd2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/input/serio/libps2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ bool ps2_handle_ack(struct ps2dev *ps2dev, u8 data)
445445
ps2dev->flags &= ~PS2_FLAG_ACK;
446446
wake_up(&ps2dev->wait);
447447

448-
if (data != PS2_RET_ACK)
448+
if (!ps2dev->nak && data != PS2_RET_ACK)
449449
ps2_handle_response(ps2dev, data);
450450

451451
return true;

0 commit comments

Comments
 (0)