Skip to contentSkip to conversation

spi: pxa2xx: Setup maximum supported DMA transfer length

PATCH In review Andy Shevchenko 2 participants 2 messages Feb 19, 2019 – Feb 20, 2019

Subsystems (4)
lore
Share & tools
lore

Andy Shevchenko

author reviewer
#0 lore raw

PATCH 1/1 spi: pxa2xx: Setup maximum supported DMA transfer length

When the commit b6ced294fb61

("spi: pxa2xx: Switch to SPI core DMA mapping functionality")

switches to SPI core provided DMA helpers, it missed to setup maximum supported DMA transfer length for the controller and thus users mistakenly try to send more data than supported with the following warning:

ili9341 spi-PRP0001:01: DMA disabled for transfer length 153600 greater than 65536

Setup maximum supported DMA transfer length in order to make users know the limit.

Fixes b6ced294fb61 ("spi: pxa2xx: Switch to SPI core DMA mapping functionality")
Cc Jarkko Nikula <[email protected]>
---
 drivers/spi/spi-pxa2xx.c | 1 +
 1 file changed, 1 insertion(+)
drivers/spi/spi-pxa2xx.c +1 -0
index 3458912b4efa..a90d0d5b18a5 100644
@@ -1711,6 +1711,7 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)
 			platform_info->enable_dma = false;
 		} else {
 			master->can_dma = pxa2xx_spi_can_dma;
+			master->max_dma_len = MAX_DMA_LEN;
 		}
 	}
 
Signature · 1 line
2.20.1
maintainer
#1 lore raw

Applied "spi: pxa2xx: Setup maximum supported DMA transfer length" to the spi tree

The patch

spi: pxa2xx: Setup maximum supported DMA transfer length

has been applied to the spi tree at

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

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

Quoted 1 line

From ef070b4e4aa25bb5f8632ad196644026c11903bf Mon Sep 17 00:00:00 2001

From: Andy Shevchenko <[email protected]>
Date: Tue, 19 Feb 2019 23:21:28 +0300
Subject: [PATCH] spi: pxa2xx: Setup maximum supported DMA transfer length

When the commit b6ced294fb61

("spi: pxa2xx: Switch to SPI core DMA mapping functionality")

switches to SPI core provided DMA helpers, it missed to setup maximum supported DMA transfer length for the controller and thus users mistakenly try to send more data than supported with the following warning:

ili9341 spi-PRP0001:01: DMA disabled for transfer length 153600 greater than 65536

Setup maximum supported DMA transfer length in order to make users know the limit.

Fixes b6ced294fb61 ("spi: pxa2xx: Switch to SPI core DMA mapping functionality")
---
 drivers/spi/spi-pxa2xx.c | 1 +
 1 file changed, 1 insertion(+)
drivers/spi/spi-pxa2xx.c +1 -0
index d84b893a64d7..3e82eaad0f2d 100644
@@ -1696,6 +1696,7 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)
 			platform_info->enable_dma = false;
 		} else {
 			master->can_dma = pxa2xx_spi_can_dma;
+			master->max_dma_len = MAX_DMA_LEN;
 		}
 	}
 
Signature · 1 line
2.20.1