Conor Dooley
49e1f0fd0d
i2c: microchip-core: fix "ghost" detections
...
Running i2c-detect currently produces an output akin to:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 08 -- 0a -- 0c -- 0e --
10: 10 -- 12 -- 14 -- 16 -- UU 19 -- 1b -- 1d -- 1f
20: -- 21 -- 23 -- 25 -- 27 -- 29 -- 2b -- 2d -- 2f
30: -- -- -- -- -- -- -- -- 38 -- 3a -- 3c -- 3e --
40: 40 -- 42 -- 44 -- 46 -- 48 -- 4a -- 4c -- 4e --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 -- 62 -- 64 -- 66 -- 68 -- 6a -- 6c -- 6e --
70: 70 -- 72 -- 74 -- 76 --
This happens because for an i2c_msg with a len of 0 the driver will
mark the transmission of the message as a success once the START has
been sent, without waiting for the devices on the bus to respond with an
ACK/NAK. Since i2cdetect seems to run in a tight loop over all addresses
the NAK is treated as part of the next test for the next address.
Delete the fast path that marks a message as complete when idev->msg_len
is zero after sending a START/RESTART since this isn't a valid scenario.
CC: stable@vger.kernel.org
Fixes: 64a6f1c498 ("i2c: add support for microchip fpga i2c controllers")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com >
Reviewed-by: Andi Shyti <andi.shyti@kernel.org >
Link: https://lore.kernel.org/r/20241218-outbid-encounter-b2e78b1cc707@spud
Signed-off-by: Andi Shyti <andi.shyti@kernel.org >
2024-12-26 01:54:47 +01:00
..
2024-07-11 15:13:10 +02:00
2024-09-10 00:33:52 +02:00
2024-07-09 00:46:06 +02:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-01-18 21:10:41 +01:00
2024-12-02 11:34:44 -08:00
2022-11-01 13:41:22 +01:00
2024-11-17 11:58:14 +01:00
2022-11-01 13:41:22 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-05-06 00:56:31 +02:00
2024-06-12 17:07:33 +01:00
2020-11-03 21:34:40 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-07-09 00:46:06 +02:00
2022-02-15 10:04:53 +01:00
2024-12-01 15:12:43 -08:00
2024-11-17 11:58:14 +01:00
2024-07-11 15:13:30 +02:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-13 23:29:47 +01:00
2022-02-11 15:38:23 +01:00
2024-12-03 08:22:25 -08:00
2024-11-24 16:03:51 +01:00
2024-12-03 08:22:25 -08:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-12-03 08:22:25 -08:00
2024-11-17 11:58:14 +01:00
2024-07-11 15:14:08 +02:00
2024-11-17 11:58:14 +01:00
2022-08-11 23:02:51 +02:00
2024-01-18 21:10:41 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-07-11 15:14:09 +02:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-07-11 15:14:10 +02:00
2024-11-17 11:58:14 +01:00
2024-11-13 23:29:46 +01:00
2024-11-17 11:58:14 +01:00
2022-08-11 23:02:51 +02:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-12-25 23:45:05 +01:00
2024-11-17 11:58:14 +01:00
2024-11-13 23:29:46 +01:00
2024-09-10 00:36:55 +02:00
2024-11-17 11:58:14 +01:00
2024-09-10 11:02:45 +02:00
2024-11-17 11:58:14 +01:00
2024-12-02 11:34:44 -08:00
2024-11-17 11:58:14 +01:00
2024-07-11 15:14:14 +02:00
2023-06-05 10:43:45 +02:00
2024-11-17 11:58:14 +01:00
2024-12-26 01:54:47 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-12-10 16:07:53 +01:00
2024-11-17 11:58:14 +01:00
2024-10-02 17:23:23 -04:00
2024-11-17 11:58:14 +01:00
2024-07-11 15:14:16 +02:00
2024-07-11 15:14:16 +02:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-07-11 15:14:17 +02:00
2024-07-03 16:44:22 +02:00
2024-07-11 15:14:17 +02:00
2022-11-12 21:30:16 +01:00
2024-01-18 21:10:41 +01:00
2024-11-17 11:58:14 +01:00
2021-01-26 07:42:27 +01:00
2024-11-17 11:58:14 +01:00
2024-12-02 11:34:44 -08:00
2024-11-13 23:29:46 +01:00
2024-12-10 15:50:50 +01:00
2024-11-17 11:58:14 +01:00
2024-09-10 00:33:52 +02:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:56 +01:00
2024-11-17 11:58:14 +01:00
2024-11-24 16:03:50 +01:00
2024-11-17 11:58:14 +01:00
2024-12-12 12:54:02 +01:00
2024-11-17 11:58:14 +01:00
2024-07-11 15:14:20 +02:00
2024-11-17 11:58:57 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-01-18 21:10:41 +01:00
2024-11-17 11:58:14 +01:00
2024-01-18 21:10:41 +01:00
2024-01-18 21:10:41 +01:00
2024-07-11 15:14:20 +02:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2020-09-21 11:45:43 +02:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-07-11 15:14:22 +02:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-07-11 15:14:23 +02:00
2024-07-11 15:14:23 +02:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-01-18 21:10:41 +01:00
2024-07-11 15:14:24 +02:00
2024-06-26 16:07:21 +02:00
2024-11-17 11:58:14 +01:00
2024-07-11 15:14:24 +02:00
2024-01-18 21:10:41 +01:00
2024-11-17 11:58:14 +01:00
2024-09-10 00:36:50 +02:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2024-11-21 13:19:29 -08:00
2024-11-21 13:19:29 -08:00
2024-11-17 11:58:14 +01:00