* [PATCH v2] dmaengine: ti: k3-udma: Fix delayed_work usage for tx drain workaround
@ 2020-06-18 11:40 Peter Ujfalusi
2020-06-24 6:03 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Peter Ujfalusi @ 2020-06-18 11:40 UTC (permalink / raw)
To: vkoul; +Cc: dmaengine, dan.j.williams, tomi.valkeinen
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: 25dcb5dd7b7c ("dmaengine: ti: New driver for K3 UDMA")
Reported-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
Hi,
Change since v1:
- Added my sob
Regards,
Peter
drivers/dma/ti/k3-udma.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index 0d5fb154b8e2..6c879a734360 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -1907,8 +1907,6 @@ static int udma_alloc_chan_resources(struct dma_chan *chan)
udma_reset_rings(uc);
- INIT_DELAYED_WORK_ONSTACK(&uc->tx_drain.work,
- udma_check_tx_completion);
return 0;
err_irq_free:
@@ -3020,7 +3018,6 @@ static void udma_free_chan_resources(struct dma_chan *chan)
}
cancel_delayed_work_sync(&uc->tx_drain.work);
- destroy_delayed_work_on_stack(&uc->tx_drain.work);
if (uc->irq_num_ring > 0) {
free_irq(uc->irq_num_ring, uc);
@@ -3712,6 +3709,7 @@ static int udma_probe(struct platform_device *pdev)
tasklet_init(&uc->vc.task, udma_vchan_complete,
(unsigned long)&uc->vc);
init_completion(&uc->teardown_completed);
+ INIT_DELAYED_WORK(&uc->tx_drain.work, udma_check_tx_completion);
}
ret = dma_async_device_register(&ud->ddev);
--
Peter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] dmaengine: ti: k3-udma: Fix delayed_work usage for tx drain workaround
2020-06-18 11:40 [PATCH v2] dmaengine: ti: k3-udma: Fix delayed_work usage for tx drain workaround Peter Ujfalusi
@ 2020-06-24 6:03 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2020-06-24 6:03 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: dmaengine, dan.j.williams, tomi.valkeinen
On 18-06-20, 14:40, Peter Ujfalusi wrote:
> 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.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-24 6:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 11:40 [PATCH v2] dmaengine: ti: k3-udma: Fix delayed_work usage for tx drain workaround Peter Ujfalusi
2020-06-24 6:03 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).