]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: imx-lpi2c: fix SMBus block read NACK after byte count
authorCarlos Song <carlos.song@nxp.com>
Fri, 23 Jan 2026 10:54:58 +0000 (18:54 +0800)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:21:25 +0000 (07:21 -0500)
commit80a2e762b21774da69fcf42184835525a7e4a8d9
tree0007602fc5d1682113576293ff57915abfa3f18f
parent5e227857fcd942a1ea439272e636b126a97f593c
i2c: imx-lpi2c: fix SMBus block read NACK after byte count

[ Upstream commit efdc383d1cc28d45cbf5a23b5ffa997010aaacb4 ]

The LPI2C controller sends a NACK at the end of a receive command
unless another receive command is already queued in MTDR. During
SMBus block reads, this causes the controller to NACK immediately
after receiving the block length byte, aborting the transfer before
the data bytes are read.

Fix this by queueing a second receive command as soon as the block
length byte is received, keeping MTDR non-empty and ensuring
continuous ACKs. The initial receive command reads the block length,
and the subsequent command reads the remaining data bytes according
to the reported length.

Fixes: a55fa9d0e42e ("i2c: imx-lpi2c: add low power i2c bus driver")
Signed-off-by: Carlos Song <carlos.song@nxp.com>
Cc: <stable@vger.kernel.org> # v4.10+
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260123105459.3448822-1-carlos.song@nxp.com
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-imx-lpi2c.c