]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: axi-dmac: Fix software cyclic mode
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 5 Sep 2017 08:16:38 +0000 (10:16 +0200)
committerVinod Koul <vinod.koul@intel.com>
Sun, 17 Sep 2017 13:28:18 +0000 (18:58 +0530)
commita06f8eeb24d7d11ebdb6cb493b6dc083d60572ce
treeffeb591891f212ca16b30faae38ec711696ade6a
parentbc4990265a9e53d355f9b896fb23e77b9e2fab8a
dmaengine: axi-dmac: Fix software cyclic mode

When running in software cyclic mode the driver currently does not go back
to the first segment once the last segment has been reached. Effectively
making the transfer non-cyclic.

Fix this by going back to the first segment once the last segment has been
reached for cyclic transfers.

Special care need to be taken to avoid a segment from being submitted
multiple times concurrently, which could happen for transfers with a number
of segments that is smaller than the DMA controller's internal queue.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/dma-axi-dmac.c