* [PATCH AUTOSEL 4.19 08/79] dmaengine: xilinx_dma: Clear desc_pendingcount in xilinx_dma_reset
[not found] <20191211152643.23056-1-sashal@kernel.org>
@ 2019-12-11 15:25 ` Sasha Levin
0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2019-12-11 15:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Nicholas Graumann, Radhey Shyam Pandey, Vinod Koul, Sasha Levin,
dmaengine, linux-arm-kernel
From: Nicholas Graumann <nick.graumann@gmail.com>
[ 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 | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 8aec137b4fcaa..d56b6b0e22a84 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -1427,6 +1427,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;
--
2.20.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-12-11 15:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20191211152643.23056-1-sashal@kernel.org>
2019-12-11 15:25 ` [PATCH AUTOSEL 4.19 08/79] dmaengine: xilinx_dma: Clear desc_pendingcount in xilinx_dma_reset Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).