diff options
| author | Navon John Lukose <navonjohnlukose@gmail.com> | 2026-09-21 04:30:17 +0530 |
|---|---|---|
| committer | Andi Shyti <andi.shyti@linux.intel.com> | 2026-10-22 21:22:15 +0200 |
| commit | 73dae605cad7921800677d982bfaeb81cc930dec (patch) | |
| tree | c028726831e54992285950ec51e8657e3f8f2e7b /tools/lib/python | |
| parent | a65917d0a22f9b10694853b725f9cd399fc3ef4d (diff) | |
i2c: designware: queue only one read command for block reads
i2c_dw_xfer_msg() pre-queues up to rx_fifo_depth read commands based
on the initial msg.len. For I2C_M_RECV_LEN transfers the real length
is unknown until the first byte arrives and i2c_dw_recv_len() runs.
When a large initial length is passed, the surplus pre-queued reads
leave rx_outstanding non-zero after i2c_dw_recv_len() adjusts
msg.len, so the completion condition is never met and the transfer
times out. In a loop, this repeatedly times out the controller and
disrupts unrelated driver-bound devices on the same adapter.
Queue only one read command while I2C_M_RECV_LEN is pending.
i2c_dw_recv_len() re-enables TX_EMPTY, and the rest are queued once
the device-reported length is known.
Fixes: c3ae106050b9 ("i2c: designware: Implement support for SMBus block read and write")
Signed-off-by: Navon John Lukose <navonjohnlukose@gmail.com>
Cc: <stable@vger.kernel.org> # v4.10+
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
