]> git.baikalelectronics.ru Git - kernel.git/commit
Input: ps2-gpio - don't send rx data before the stop bit
authorDanilo Krummrich <danilokrummrich@dk-develop.de>
Tue, 15 Feb 2022 22:45:43 +0000 (14:45 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 16 Feb 2022 01:25:39 +0000 (17:25 -0800)
commit5d4cfb52c51ce0ac3831034b4e0c87f2766517f5
treeb93652f1ba89efb64cf521007918b824eb939d3c
parent3070cde3001d18c23376baeef3985c2f27cd78f6
Input: ps2-gpio - don't send rx data before the stop bit

Sending the data before processing the stop bit from the device already
saves the data of the current xfer in case the stop bit is missed.

However, when TX xfers are enabled this introduces a race condition when
a peripheral driver using the bus immediately requests a TX xfer from IRQ
context.

Therefore the data must be send after receiving the stop bit, although
it is possible the data is lost when missing the stop bit.

Signed-off-by: Danilo Krummrich <danilokrummrich@dk-develop.de>
Link: https://lore.kernel.org/r/20220215160208.34826-5-danilokrummrich@dk-develop.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/serio/ps2-gpio.c