]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.19.31/spi-pxa2xx-setup-maximum-supported-dma-transfer-length.patch
Linux 4.19.31
[thirdparty/kernel/stable-queue.git] / releases / 4.19.31 / spi-pxa2xx-setup-maximum-supported-dma-transfer-length.patch
1 From ef070b4e4aa25bb5f8632ad196644026c11903bf Mon Sep 17 00:00:00 2001
2 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
3 Date: Tue, 19 Feb 2019 23:21:28 +0300
4 Subject: spi: pxa2xx: Setup maximum supported DMA transfer length
5
6 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
7
8 commit ef070b4e4aa25bb5f8632ad196644026c11903bf upstream.
9
10 When the commit b6ced294fb61
11
12 ("spi: pxa2xx: Switch to SPI core DMA mapping functionality")
13
14 switches to SPI core provided DMA helpers, it missed to setup maximum
15 supported DMA transfer length for the controller and thus users
16 mistakenly try to send more data than supported with the following
17 warning:
18
19 ili9341 spi-PRP0001:01: DMA disabled for transfer length 153600 greater than 65536
20
21 Setup maximum supported DMA transfer length in order to make users know
22 the limit.
23
24 Fixes: b6ced294fb61 ("spi: pxa2xx: Switch to SPI core DMA mapping functionality")
25 Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
26 Signed-off-by: Mark Brown <broonie@kernel.org>
27 Cc: stable@vger.kernel.org
28 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
29
30 ---
31 drivers/spi/spi-pxa2xx.c | 1 +
32 1 file changed, 1 insertion(+)
33
34 --- a/drivers/spi/spi-pxa2xx.c
35 +++ b/drivers/spi/spi-pxa2xx.c
36 @@ -1612,6 +1612,7 @@ static int pxa2xx_spi_probe(struct platf
37 platform_info->enable_dma = false;
38 } else {
39 master->can_dma = pxa2xx_spi_can_dma;
40 + master->max_dma_len = MAX_DMA_LEN;
41 }
42 }
43