From: Frank Li <Frank.li@oss.nxp.com>
To: Koichiro Den <den@valinux.co.jp>
Cc: Manivannan Sadhasivam <mani@kernel.org>,
Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
Serge Semin <fancer.lancer@gmail.com>,
Bjorn Helgaas <bhelgaas@google.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dmaengine: dw-edma: Clear chip->dw after removal
Date: Wed, 11 Nov 2026 21:31:22 -0600 [thread overview]
Message-ID: <avUzCg9LRo6tjDPB@SMW015318> (raw)
In-Reply-To: <20261110082433.1798391-1-den@valinux.co.jp>
On Tue, Nov 10, 2026 at 05:24:33PM +0900, Koichiro Den wrote:
> dw_edma_remove() unregisters the DMA device and releases its resources,
> but leaves chip->dw set, so the pointer no longer indicates whether the
> eDMA instance is still registered. Some in-tree glue drivers call
> dw_pcie_ep_deinit() when dw_pcie_ep_init_registers() fails. If
> initialization has already removed eDMA, deinitialization attempts to
> tear down the same instance again.
>
> Regardless of whether those error paths are reworked, clear chip->dw on
> removal to match its assignment on successful probe. This also lets the
> existing NULL check skip repeated teardown.
>
> Fixes: 869bc5253406 ("PCI: dwc: ep: Fix DBI access failure for drivers requiring refclk from host")
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://sashiko.dev/#/patchset/20261022082230.3164834-1-den@valinux.co.jp?part=2
> Signed-off-by: Koichiro Den <den@valinux.co.jp>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> drivers/dma/dw-edma/dw-edma-core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/dma/dw-edma/dw-edma-core.c b/drivers/dma/dw-edma/dw-edma-core.c
> index d682074eaa0e..daa2084485d5 100644
> --- a/drivers/dma/dw-edma/dw-edma-core.c
> +++ b/drivers/dma/dw-edma/dw-edma-core.c
> @@ -1509,6 +1509,8 @@ int dw_edma_remove(struct dw_edma_chip *chip)
> list_del(&chan->vc.chan.device_node);
> }
>
> + chip->dw = NULL;
> +
> return err;
> }
> EXPORT_SYMBOL_GPL(dw_edma_remove);
>
> base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
> --
> 2.54.0
>
prev parent reply other threads:[~2026-11-12 3:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 8:24 Koichiro Den
2026-11-12 3:31 ` Frank Li [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=avUzCg9LRo6tjDPB@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=Frank.Li@kernel.org \
--cc=bhelgaas@google.com \
--cc=den@valinux.co.jp \
--cc=dmaengine@vger.kernel.org \
--cc=fancer.lancer@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mani@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®