mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
dmaengine: altera-msgdma: initialize state before requesting IRQ
msgdma_probe() registers the IRQ before initializing the tasklet, lock,
and descriptor lists used by the interrupt handler. A pending interrupt
can access incomplete state during probe.
Initialize the handler state before requesting the IRQ so the interrupt
path observes ready software state.
Fixes: a85c6f1b29 ("dmaengine: Add driver for Altera / Intel mSGDMA IP core")
Cc: stable@vger.kernel.org
Assisted-by: Codex:GPT-5
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Acked-by: Adrian Ng Ho Yin <adrian.ho.yin.ng@altera.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260830053308.2190597-1-runyu.xiao@seu.edu.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
c64189e977
commit
a5f8e3471f
|
|
@ -847,11 +847,6 @@ static int msgdma_probe(struct platform_device *pdev)
|
|||
if (mdev->irq < 0)
|
||||
return -ENXIO;
|
||||
|
||||
ret = devm_request_irq(&pdev->dev, mdev->irq, msgdma_irq_handler,
|
||||
0, dev_name(&pdev->dev), mdev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
tasklet_setup(&mdev->irq_tasklet, msgdma_tasklet);
|
||||
|
||||
dma_cookie_init(&mdev->dmachan);
|
||||
|
|
@ -863,6 +858,11 @@ static int msgdma_probe(struct platform_device *pdev)
|
|||
INIT_LIST_HEAD(&mdev->done_list);
|
||||
INIT_LIST_HEAD(&mdev->free_list);
|
||||
|
||||
ret = devm_request_irq(&pdev->dev, mdev->irq, msgdma_irq_handler,
|
||||
0, dev_name(&pdev->dev), mdev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
dma_dev = &mdev->dmadev;
|
||||
|
||||
/* Set DMA capabilities */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user