Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: cypress_ps2 - report timeouts when reading command status

Report -ETIMEDOUT error code from cypress_ps2_read_cmd_status() when
device does not send enough data within the allotted time in response
to a command.

Link: https://lore.kernel.org/r/20240628224728.2180126-3-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

+6 -3
+6 -3
drivers/input/mouse/cypress_ps2.c
··· 115 115 if (rc < 0) 116 116 goto out; 117 117 118 - wait_event_timeout(ps2dev->wait, 119 - (psmouse->pktcnt >= pktsize), 120 - msecs_to_jiffies(CYTP_CMD_TIMEOUT)); 118 + if (!wait_event_timeout(ps2dev->wait, 119 + psmouse->pktcnt >= pktsize, 120 + msecs_to_jiffies(CYTP_CMD_TIMEOUT))) { 121 + rc = -ETIMEDOUT; 122 + goto out; 123 + } 121 124 122 125 memcpy(param, psmouse->packet, pktsize); 123 126