]> git.itanic.dy.fi Git - linux-stable/commit
dmaengine: edma: Align the memcpy acnt array size with the transfer
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Mon, 18 Sep 2017 08:16:26 +0000 (11:16 +0300)
committerVinod Koul <vinod.koul@intel.com>
Thu, 21 Sep 2017 17:21:07 +0000 (22:51 +0530)
commit87a2f622cc6446c7d09ac655b7b9b04886f16a4c
treede4fa5bff5fac78e3de3465f70ae0e8584f18262
parent2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e
dmaengine: edma: Align the memcpy acnt array size with the transfer

Memory to Memory transfers does not have any special alignment needs
regarding to acnt array size, but if one of the areas are in memory mapped
regions (like PCIe memory), we need to make sure that the acnt array size
is aligned with the mem copy parameters.

Before "dmaengine: edma: Optimize memcpy operation" change the memcpy was set
up in a different way: acnt == number of bytes in a word based on
__ffs((src | dest | len), bcnt and ccnt for looping the necessary number of
words to comlete the trasnfer.

Instead of reverting the commit we can fix it to make sure that the ACNT size
is aligned to the traswnfer.

Fixes: df6694f80365a (dmaengine: edma: Optimize memcpy operation)
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: stable@vger.kernel.org
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/edma.c