Commit b5b0180c authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Vinod Koul

dmaengine: ti: k3-udma: Fix the running channel handling in alloc_chan_resources

In the unlikely case when the channel is running (RT enabled) during
alloc_chan_resources then we should use udma_reset_chan() and not
udma_stop() as the later is trying to initiate a teardown on the channel,
which is not valid at this point.
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200527070612.636-3-peter.ujfalusi@ti.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 5a9377cc
...@@ -1848,7 +1848,7 @@ static int udma_alloc_chan_resources(struct dma_chan *chan) ...@@ -1848,7 +1848,7 @@ static int udma_alloc_chan_resources(struct dma_chan *chan)
if (udma_is_chan_running(uc)) { if (udma_is_chan_running(uc)) {
dev_warn(ud->dev, "chan%d: is running!\n", uc->id); dev_warn(ud->dev, "chan%d: is running!\n", uc->id);
udma_stop(uc); udma_reset_chan(uc, false);
if (udma_is_chan_running(uc)) { if (udma_is_chan_running(uc)) {
dev_err(ud->dev, "chan%d: won't stop!\n", uc->id); dev_err(ud->dev, "chan%d: won't stop!\n", uc->id);
ret = -EBUSY; ret = -EBUSY;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment