blob: a6f2e3ca40ca7e98d80a2e8a7dcbadfbcb713b64 [file] [log] [blame]
From 80390dd1bf4f506ff78f625d2aaa11f440b1e3e7 Mon Sep 17 00:00:00 2001
From: Nicholas Graumann <>
Date: Tue, 15 Oct 2019 20:18:24 +0530
Subject: [PATCH] dmaengine: xilinx_dma: Clear desc_pendingcount in
commit 8a631a5a0f7d4a4a24dba8587d5d9152be0871cc upstream.
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 <>
Signed-off-by: Vinod Koul <>
Signed-off-by: Paul Gortmaker <>
diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 4dfdb38a1dc7..2ee86ca5ca5a 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -1435,6 +1435,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;