From: Nicholas Graumann Date: Tue, 15 Oct 2019 14:48:24 +0000 (+0530) Subject: dmaengine: xilinx_dma: Clear desc_pendingcount in xilinx_dma_reset X-Git-Tag: v5.4.8~174 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2456880b7a89bcd3a9369134c6fdeef9942bc1cb;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1571150904-3988-8-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index 5d56f1e..43acba2 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -1433,6 +1433,7 @@ static int xilinx_dma_reset(struct xilinx_dma_chan *chan) chan->err = false; chan->idle = true; + chan->desc_pendingcount = 0; chan->desc_submitcount = 0; return err;