dmaengine: xilinx_dma: Clear desc_pendingcount in xilinx_dma_reset
authorNicholas Graumann <nick.graumann@gmail.com>
Tue, 15 Oct 2019 14:48:24 +0000 (20:18 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 Jan 2020 18:12:38 +0000 (19:12 +0100)
commitc4986e473435a2b1b5825848e087c1df5be1964a
tree55f88e2e0f25714318d57ebc3b33546e596ddfed
parent40179e745ff74de306897b2ebbbb1f877880d464
dmaengine: xilinx_dma: Clear desc_pendingcount in xilinx_dma_reset

[ Upstream commit 8a631a5a0f7d4a4a24dba8587d5d9152be0871cc ]

Whenever we reset the channel, we need to clear desc_pendingcount
along with desc_submitcount. Otherwise when a new transaction is
submitted, the irq coalesce level could be programmed to an incorrect
value in the axidma case.

This behavior can be observed when terminating pending transactions
with xilinx_dma_terminate_all() and then submitting new transactions
without releasing and requesting the channel.

Signed-off-by: Nicholas Graumann <nick.graumann@gmail.com>
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Link: https://lore.kernel.org/r/1571150904-3988-8-git-send-email-radhey.shyam.pandey@xilinx.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/xilinx/xilinx_dma.c