linux-stable/drivers/dma/dw
Jarkko Nikula a46a763401 dmaengine: dw: Fix data corruption in large device to memory transfers
When transferring more data than the maximum block size supported by the
HW multiplied by source width the transfer is split into smaller chunks.
Currently code calculates the memory width and thus aligment before
splitting for both memory to device and device to memory transfers.

For memory to device transfers this work fine since alignment is preserved
through the splitting and split blocks are still memory width aligned.
However in device to memory transfers aligment breaks when maximum block
size multiplied by register width doesn't have the same alignment than the
buffer. For instance when transferring from an 8-bit register 4100 bytes
(32-bit aligned) on a DW DMA that has maximum block size of 4095 elements.
An attempt to do such transfers caused data corruption.

Fix this by calculating and setting the destination memory width after
splitting by using the split block aligment and length.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2017-01-25 11:51:39 +05:30
..
core.c dmaengine: dw: Fix data corruption in large device to memory transfers 2017-01-25 11:51:39 +05:30
internal.h dmaengine: dw: export probe()/remove() and Co to users 2014-10-15 20:31:05 +05:30
Kconfig dmaengine: sort the dw Kconfig 2015-08-24 13:58:18 +05:30
Makefile dma: dw: add PCI part of the driver 2013-07-05 11:40:45 +05:30
pci.c dmaengine: dw: pci: remove LPE Audio DMA ID 2017-01-10 10:37:34 +05:30
platform.c dmaengine: DW DMAC: add multi-block property to device tree 2016-11-30 08:57:50 +05:30
regs.h dmaengine: DW DMAC: add multi-block property to device tree 2016-11-30 08:57:50 +05:30