summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorRonald Tschalär <ronald@innovation.ch>2021-02-19 22:12:00 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2021-02-19 22:13:29 +0300
commite64123949e6c9581c97fc14594f1cf34bf1d87a8 (patch)
tree009082c54387bb3f912593a5e6a4ea26fca75b8c /drivers/input
parent0ce1ac23149c6da939a5926c098c270c58c317a0 (diff)
downloadlinux-e64123949e6c9581c97fc14594f1cf34bf1d87a8.tar.xz
Input: applespi - fix occasional crc errors under load.
For some reason, when the system is under heavy CPU load, the read following the write sometimes occurs unusually quickly, resulting in the read data not being quite ready and hence a bad packet getting read. Adding another delay after reading the status message appears to fix this. Signed-off-by: Ronald Tschalär <ronald@innovation.ch> Link: https://lore.kernel.org/r/20210217190718.11035-2-ronald@innovation.ch Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/applespi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/input/keyboard/applespi.c b/drivers/input/keyboard/applespi.c
index 27e87c45edf2..eda1b23002b5 100644
--- a/drivers/input/keyboard/applespi.c
+++ b/drivers/input/keyboard/applespi.c
@@ -749,6 +749,8 @@ static void applespi_async_write_complete(void *context)
applespi->tx_status,
APPLESPI_STATUS_SIZE);
+ udelay(SPI_RW_CHG_DELAY_US);
+
if (!applespi_check_write_status(applespi, applespi->wr_m.status)) {
/*
* If we got an error, we presumably won't get the expected