diff mbox series

spi: stm32: fix accidential revert to byte-sized transfer splitting

Message ID 20230816145237.3159817-1-l.goehrs@pengutronix.de
State Accepted
Commit 715dc9a1f0c8ae0bbd4e5b37f9a165ea39e47fe9
Headers show
Series spi: stm32: fix accidential revert to byte-sized transfer splitting | expand

Commit Message

Leonard Göhrs Aug. 16, 2023, 2:52 p.m. UTC
Commit 6f486556abe35 ("spi: stm32: renaming of spi_master into
spi_controller") included an accidential reverted of a change added in
commit 1e4929112507f ("spi: stm32: split large transfers based on word
size instead of bytes").

This breaks large SPI transfers with word sizes > 8 bits, which are
e.g. common when driving MIPI DBI displays.

Fix this by using `spi_split_transfers_maxwords()` instead of
`spi_split_transfers_maxsize()`.

Fixes: 6f486556abe35 ("spi: stm32: renaming of spi_master into spi_controller")
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
---
 drivers/spi/spi-stm32.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


base-commit: 2ccdd1b13c591d306f0401d98dedc4bdcd02b421

Comments

Mark Brown Aug. 21, 2023, 9:09 p.m. UTC | #1
On Wed, 16 Aug 2023 16:52:37 +0200, Leonard Göhrs wrote:
> Commit 6f486556abe35 ("spi: stm32: renaming of spi_master into
> spi_controller") included an accidential reverted of a change added in
> commit 1e4929112507f ("spi: stm32: split large transfers based on word
> size instead of bytes").
> 
> This breaks large SPI transfers with word sizes > 8 bits, which are
> e.g. common when driving MIPI DBI displays.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: stm32: fix accidential revert to byte-sized transfer splitting
      commit: 715dc9a1f0c8ae0bbd4e5b37f9a165ea39e47fe9

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
index 6d10fa4ab7839..7ddf9db776b06 100644
--- a/drivers/spi/spi-stm32.c
+++ b/drivers/spi/spi-stm32.c
@@ -1001,9 +1001,9 @@  static int stm32_spi_prepare_msg(struct spi_controller *ctrl,
 	if (spi->cfg->set_number_of_data) {
 		int ret;
 
-		ret = spi_split_transfers_maxsize(ctrl, msg,
-						  STM32H7_SPI_TSIZE_MAX,
-						  GFP_KERNEL | GFP_DMA);
+		ret = spi_split_transfers_maxwords(ctrl, msg,
+						   STM32H7_SPI_TSIZE_MAX,
+						   GFP_KERNEL | GFP_DMA);
 		if (ret)
 			return ret;
 	}