diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2020-05-27 10:06:12 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-06-16 18:56:03 +0300 |
commit | b5b0180c2f767e90b4a6a885a0a2abaab6e3d48d (patch) | |
tree | ca337d857d6f43964f78cd5271a72b819da392ec /drivers/dma | |
parent | 5a9377cc7421b59b13c9b90b8dc0aca332a1c958 (diff) | |
download | linux-b5b0180c2f767e90b4a6a885a0a2abaab6e3d48d.tar.xz |
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: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200527070612.636-3-peter.ujfalusi@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/ti/k3-udma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index 4893b6cbd7a6..1c7d6dad8eb4 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -1848,7 +1848,7 @@ static int udma_alloc_chan_resources(struct dma_chan *chan) if (udma_is_chan_running(uc)) { 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)) { dev_err(ud->dev, "chan%d: won't stop!\n", uc->id); ret = -EBUSY; |