[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1567701424-25658-8-git-send-email-radhey.shyam.pandey@xilinx.com>
Date: Thu, 5 Sep 2019 22:07:03 +0530
From: Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
To: vkoul@...nel.org, dan.j.williams@...el.com,
michal.simek@...inx.com, nick.graumann@...il.com,
andrea.merello@...il.com, appana.durga.rao@...inx.com,
mcgrof@...nel.org
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
Subject: [PATCH -next 7/8] dmaengine: xilinx_dma: Check for both idle and halted state in axidma stop_transfer
From: Nicholas Graumann <nick.graumann@...il.com>
When polling for a stopped transfer in AXI DMA mode, in some cases the
status of the channel may indicate IDLE instead of HALTED if the
channel was reset due to an error.
Signed-off-by: Nicholas Graumann <nick.graumann@...il.com>
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
---
drivers/dma/xilinx/xilinx_dma.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index b5dd62a..0896e07 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -1092,8 +1092,9 @@ static int xilinx_dma_stop_transfer(struct xilinx_dma_chan *chan)
/* Wait for the hardware to halt */
return xilinx_dma_poll_timeout(chan, XILINX_DMA_REG_DMASR, val,
- val & XILINX_DMA_DMASR_HALTED, 0,
- XILINX_DMA_LOOP_COUNT);
+ val | (XILINX_DMA_DMASR_IDLE |
+ XILINX_DMA_DMASR_HALTED),
+ 0, XILINX_DMA_LOOP_COUNT);
}
/**
--
2.7.4
Powered by blists - more mailing lists