]> git.itanic.dy.fi Git - linux-stable/commit
spi: spi-imx: fix off-by-one in mx51 CPU mode burst length
authorAdam Butcher <adam@jessamine.co.uk>
Mon, 18 Mar 2024 17:50:52 +0000 (17:50 +0000)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:17:35 +0000 (18:17 -0400)
commit68fb3d6e17506daa3bb69aa9f4fbfbace8b628a3
tree497b84cff1d4cf673022b22d22143a30840a39f7
parent0aa607a996cbcfad164224dca6f1c9ff7363d999
spi: spi-imx: fix off-by-one in mx51 CPU mode burst length

[ Upstream commit cf6d79a0f5769b5f4d9579ddaf88d2c30b03b873 ]

c712c05e46c8 ("spi: imx: fix the burst length at DMA mode and CPU mode")
corrects three cases of setting the ECSPI burst length but erroneously
leaves the in-range CPU case one bit to big (in that field a value of
0 means 1 bit).  The effect was that transmissions that should have been
8-bit bytes appeared as 9-bit causing failed communication with SPI
devices.

Link: https://lore.kernel.org/all/20240201105451.507005-1-carlos.song@nxp.com/
Link: https://lore.kernel.org/all/20240204091912.36488-1-carlos.song@nxp.com/
Fixes: c712c05e46c8 ("spi: imx: fix the burst length at DMA mode and CPU mode")
Signed-off-by: Adam Butcher <adam@jessamine.co.uk>
Link: https://msgid.link/r/20240318175119.3334-1-adam@jessamine.co.uk
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-imx.c