Patch "spi: imx: Fix small DMA transfers" has been added to the 4.1-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
spi: imx: Fix small DMA transfers
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
spi-imx-fix-small-dma-transfers.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
f6ee9b582d2db652497b73c1f117591dfb6d3a90Mon Sep 17 00:00:00 2001
From: Sascha Hauer <[email protected]>
Date: Fri, 24 Jul 2015 15:01:08 +0200
Subject: spi: imx: Fix small DMA transfers
From: Sascha Hauer <[email protected]>
commit f6ee9b582d2db652497b73c1f117591dfb6d3a90 upstream.
DMA transfers must be greater than the watermark level size. spi_imx->rx_wml and spi_imx->tx_wml contain the watermark level in 32bit words whereas struct spi_transfer contains the transfer len in bytes. Fix the check if DMA is possible for a transfer accordingly. This fixes transfers with sizes between 33 and 128 bytes for which previously was claimed that DMA is possible.
--- drivers/spi/spi-imx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/spi/spi-imx.c +3 -2
@@ -201,8 +201,9 @@ static bool spi_imx_can_dma(struct spi_m {struct spi_imx_data *spi_imx =spi_master_get_devdata (master); -if (spi_imx->dma_is_inited && (transfer->len > spi_imx->rx_wml) - && (transfer->len > spi_imx->tx_wml)) +if (spi_imx->dma_is_inited + && transfer->len > spi_imx->rx_wml *sizeof (u32) + && transfer->len > spi_imx->tx_wml *sizeof (u32))return true;return false; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.1/spi-imx-fix-small-dma-transfers.patch