All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@oss.nxp.com>
To: Myeonghun Pak <mhun512@gmail.com>
Cc: amelie.delaunay@foss.st.com, vkoul@kernel.org,
	dmaengine@vger.kernel.org, Frank.Li@kernel.org,
	mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, ae878000@gmail.com
Subject: Re: [PATCH v2 1/2] dmaengine: stm32-dma3: unregister the OF DMA provider on removal
Date: Mon, 16 Nov 2026 15:17:03 -0600	[thread overview]
Message-ID: <avtyzyLz4Ak_RsLW@SMW015318> (raw)
In-Reply-To: <CAGEsz8Gj01qFUzbEqymn8oPM6puJkaJoD6QLGabFnG9kzMYF=g@mail.gmail.com>

On Mon, Nov 09, 2026 at 07:03:42PM -0600, Myeonghun Pak wrote:
> Probe registers an OF DMA controller, but remove does not unregister it.
> The OF DMA helpers retain the driver's data pointer after managed cleanup
> frees it, leaving a stale provider entry for subsequent channel requests.
>
> Unregister the OF DMA controller before tearing down the device resources.
> There are no fallible operations after its registration in probe, so no
> matching probe error path is needed.
>
> Fixes: f561ec8b2b33 ("dmaengine: Add STM32 DMA3 support")
>
> Co-developed-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
> ---
> No hardware runtime testing.
>
> diff --git a/drivers/dma/stm32/stm32-dma3.c b/drivers/dma/stm32/stm32-dma3.c
> --- a/drivers/dma/stm32/stm32-dma3.c
> +++ b/drivers/dma/stm32/stm32-dma3.c
> @@ -1921,6 +1921,7 @@
>
>  static void stm32_dma3_remove(struct platform_device *pdev)
>  {
> +	of_dma_controller_free(pdev->dev.of_node);

devm_of_dma_controller_register() to fix this

Frank

>  	pm_runtime_disable(&pdev->dev);
>  }
>
>
>
> On Tue, 10 Nov 2026 00:42:55 +0000, mhun512@gmail.com wrote:
> > Split OF provider teardown from the managed clock cleanup requested in the
> > review of the original patch. Patch 1 unregisters the provider on removal;
> > patch 2 returns the active clock reference after managed DMA/IRQ teardown.
> >
> > Keep the existing remove-time runtime PM disable barrier. Check initial PM
> > activation failure, and let devres handle later probe failures. Remove the
> > manual IRQ-free loop from the original submission.
> >
> > No hardware runtime testing.

  reply	other threads:[~2026-11-16 21:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  0:42 [PATCH v2 0/2] dmaengine: stm32-dma3: fix provider and clock teardown mhun512
2026-11-10  1:03 ` [PATCH v2 1/2] dmaengine: stm32-dma3: unregister the OF DMA provider on removal Myeonghun Pak
2026-11-16 21:17   ` Frank Li [this message]
2026-11-10  1:05 ` [PATCH v2 2/2] dmaengine: stm32-dma3: defer clock cleanup to managed teardown Myeonghun Pak
2026-11-16 21:35   ` Frank Li

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=avtyzyLz4Ak_RsLW@SMW015318 \
    --to=frank.li@oss.nxp.com \
    --cc=Frank.Li@kernel.org \
    --cc=ae878000@gmail.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=amelie.delaunay@foss.st.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mhun512@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.