]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
spi: pxa2xx: Setup maximum supported DMA transfer length
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 19 Feb 2019 20:21:28 +0000 (23:21 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 19:09:57 +0000 (20:09 +0100)
commit ef070b4e4aa25bb5f8632ad196644026c11903bf upstream.

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")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-pxa2xx.c

index 14f4ea59caff7a235faafc7c5cfb91776bcc68a9..b624f6fb04ce5906c00e504b9ff21a72f2f4181c 100644 (file)
@@ -1612,6 +1612,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;
                }
        }