dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: uniphier-xdmac: Use readl_poll_timeout_atomic() in atomic state
@ 2021-07-27  5:47 Kunihiko Hayashi
  2021-07-27 12:45 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Kunihiko Hayashi @ 2021-07-27  5:47 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Dan Carpenter, Masami Hiramatsu, dmaengine, linux-arm-kernel,
	linux-kernel, Kunihiko Hayashi

The function uniphier_xdmac_chan_stop() is only called in atomic state.
Should use readl_poll_timeout_atomic() there instead of
readl_poll_timeout().

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 667b9251440b ("dmaengine: uniphier-xdmac: Add UniPhier external DMA controller driver")
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
 drivers/dma/uniphier-xdmac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/uniphier-xdmac.c b/drivers/dma/uniphier-xdmac.c
index 16b1965..d6b8a20 100644
--- a/drivers/dma/uniphier-xdmac.c
+++ b/drivers/dma/uniphier-xdmac.c
@@ -209,8 +209,8 @@ static int uniphier_xdmac_chan_stop(struct uniphier_xdmac_chan *xc)
 	writel(0, xc->reg_ch_base + XDMAC_TSS);
 
 	/* wait until transfer is stopped */
-	return readl_poll_timeout(xc->reg_ch_base + XDMAC_STAT, val,
-				  !(val & XDMAC_STAT_TENF), 100, 1000);
+	return readl_poll_timeout_atomic(xc->reg_ch_base + XDMAC_STAT, val,
+					 !(val & XDMAC_STAT_TENF), 100, 1000);
 }
 
 /* xc->vc.lock must be held by caller */
-- 
2.7.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] dmaengine: uniphier-xdmac: Use readl_poll_timeout_atomic() in atomic state
  2021-07-27  5:47 [PATCH] dmaengine: uniphier-xdmac: Use readl_poll_timeout_atomic() in atomic state Kunihiko Hayashi
@ 2021-07-27 12:45 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2021-07-27 12:45 UTC (permalink / raw)
  To: Kunihiko Hayashi
  Cc: Dan Carpenter, Masami Hiramatsu, dmaengine, linux-arm-kernel,
	linux-kernel

On 27-07-21, 14:47, Kunihiko Hayashi wrote:
> The function uniphier_xdmac_chan_stop() is only called in atomic state.
> Should use readl_poll_timeout_atomic() there instead of
> readl_poll_timeout().

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-27 12:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27  5:47 [PATCH] dmaengine: uniphier-xdmac: Use readl_poll_timeout_atomic() in atomic state Kunihiko Hayashi
2021-07-27 12:45 ` Vinod Koul

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox