dmaengine: ptdma: fix concurrency issue with multiple dma transfer
authorSanjay R Mehta <sanju.mehta@amd.com>
Wed, 2 Feb 2022 15:14:39 +0000 (09:14 -0600)
committerVinod Koul <vkoul@kernel.org>
Tue, 15 Feb 2022 05:24:54 +0000 (10:54 +0530)
commit6fa7e0e836e23e2c758ac3930b040c8abbbf8a6f
treeb6c7cc353fef1bc5733ceb71e4e6a43e863e7cff
parent614c8beca7cd6e7093385c88da800e258b7eb0ca
dmaengine: ptdma: fix concurrency issue with multiple dma transfer

The command should be submitted only if the engine is idle,
for this, the next available descriptor is checked and set the flag
to false in case the descriptor is non-empty.

Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com>
Link: https://lore.kernel.org/r/1643814880-3882-2-git-send-email-Sanju.Mehta@amd.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/ptdma/ptdma-dmaengine.c