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

dmaengine: ti: k3-udma: Fix delayed_work usage for tx drain workaround

INIT_DELAYED_WORK_ONSTACK() must be used with on-stack delayed work, which
is not the case here.
Use normal delayed_work for the channels instead.

Fixes: 25dcb5dd ("dmaengine: ti: New driver for K3 UDMA")
Reported-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200618114004.6268-1-peter.ujfalusi@ti.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 66983bc1
...@@ -1907,8 +1907,6 @@ static int udma_alloc_chan_resources(struct dma_chan *chan) ...@@ -1907,8 +1907,6 @@ static int udma_alloc_chan_resources(struct dma_chan *chan)
udma_reset_rings(uc); udma_reset_rings(uc);
INIT_DELAYED_WORK_ONSTACK(&uc->tx_drain.work,
udma_check_tx_completion);
return 0; return 0;
err_irq_free: err_irq_free:
...@@ -3020,7 +3018,6 @@ static void udma_free_chan_resources(struct dma_chan *chan) ...@@ -3020,7 +3018,6 @@ static void udma_free_chan_resources(struct dma_chan *chan)
} }
cancel_delayed_work_sync(&uc->tx_drain.work); cancel_delayed_work_sync(&uc->tx_drain.work);
destroy_delayed_work_on_stack(&uc->tx_drain.work);
if (uc->irq_num_ring > 0) { if (uc->irq_num_ring > 0) {
free_irq(uc->irq_num_ring, uc); free_irq(uc->irq_num_ring, uc);
...@@ -3712,6 +3709,7 @@ static int udma_probe(struct platform_device *pdev) ...@@ -3712,6 +3709,7 @@ static int udma_probe(struct platform_device *pdev)
tasklet_init(&uc->vc.task, udma_vchan_complete, tasklet_init(&uc->vc.task, udma_vchan_complete,
(unsigned long)&uc->vc); (unsigned long)&uc->vc);
init_completion(&uc->teardown_completed); init_completion(&uc->teardown_completed);
INIT_DELAYED_WORK(&uc->tx_drain.work, udma_check_tx_completion);
} }
ret = dma_async_device_register(&ud->ddev); ret = dma_async_device_register(&ud->ddev);
......
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