mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ng, Adrian Ho Yin" <adrian.ho.yin.ng@altera.com>
To: Runyu Xiao <runyu.xiao@seu.edu.cn>
Cc: sr@denx.de, vkoul@kernel.org, Frank.Li@kernel.org,
	dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, jianhao.xu@seu.edu.cn
Subject: Re: [PATCH] dmaengine: altera-msgdma: initialize state before requesting IRQ
Date: Tue, 1 Sep 2026 15:21:16 +0800	[thread overview]
Message-ID: <cb9d5481-ae1d-4c32-8178-39aff24bc371@altera.com> (raw)
In-Reply-To: <20260830053308.2190597-1-runyu.xiao@seu.edu.cn>

On 8/30/2026 1:33 PM, Runyu Xiao wrote:
> 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: a85c6f1b2921 ("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>

>   drivers/dma/altera-msgdma.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/dma/altera-msgdma.c b/drivers/dma/altera-msgdma.c
> index e23e5b441..412f4bce1 100644
> --- a/drivers/dma/altera-msgdma.c
> +++ b/drivers/dma/altera-msgdma.c
> @@ -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 */


      parent reply	other threads:[~2026-09-01  7:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-30  5:33 Runyu Xiao
2026-08-31 15:50 ` Frank Li
2026-09-01  7:21 ` Ng, Adrian Ho Yin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb9d5481-ae1d-4c32-8178-39aff24bc371@altera.com \
    --to=adrian.ho.yin.ng@altera.com \
    --cc=Frank.Li@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=jianhao.xu@seu.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=runyu.xiao@seu.edu.cn \
    --cc=sr@denx.de \
    --cc=stable@vger.kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®