From: Vinod Koul <vkoul@kernel.org>
To: "Verma, Devendra" <Devendra.Verma@amd.com>
Cc: "sashiko-reviews@lists.linux.dev"
<sashiko-reviews@lists.linux.dev>,
"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
"Frank.Li@kernel.org" <Frank.Li@kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH v1] dmaengine: dw-edma: Add Xilinx CPM6-DMA DeviceID
Date: Thu, 4 Jun 2026 21:05:38 +0530 [thread overview]
Message-ID: <aiGbShotOS4usSdm@vaman> (raw)
In-Reply-To: <BL4PR12MB948277305F69CC4A87F0D1F695102@BL4PR12MB9482.namprd12.prod.outlook.com>
On 04-06-26, 12:12, Verma, Devendra wrote:
> Public
Pls do _not_ Top Post!
>
> The pre-existing issues need to be taken up in a separate series.
> The changes require separate testing which is not related to the
> current patch.
While I agree to that and it wont block the review but would be good if
you can fix that as well. Sure affects your users...
>
> Regards,
> Devendra
>
> > -----Original Message-----
> > From: sashiko-bot@kernel.org <sashiko-bot@kernel.org>
> > Sent: Wednesday, June 3, 2026 20:15
> > To: Verma, Devendra <Devendra.Verma@amd.com>
> > Cc: dmaengine@vger.kernel.org; vkoul@kernel.org; Frank.Li@kernel.org;
> > linux-pci@vger.kernel.org
> > Subject: Re: [PATCH v1] dmaengine: dw-edma: Add Xilinx CPM6-DMA
> > DeviceID
> >
> > Thank you for your contribution! Sashiko AI review found 1 potential issue(s)
> > to consider:
> >
> > Pre-existing issues:
> > - [High] Missing pci_free_irq_vectors() cleanup on error paths in
> > dw_edma_pcie_probe() leading to IRQ resource leaks.
> > --
> >
> > commit a523468dbe7999a5962895c3e0d73662a2938006
> > Author: Devendra K Verma <devverma@amd.com>
> >
> > dmaengine: dw-edma: Add Xilinx CPM6-DMA DeviceID
> >
> > Add Device ID for AMD (Xilinx) CPM6 DMA IP to enable 64 Read and 64 Write
> > Channels. Adds the relevant dw_edma_pcie_data to use 8 Read and 8 Write
> > Channels for the initial commit.
> >
> > > diff --git a/drivers/dma/dw-edma/dw-edma-pcie.c
> > > b/drivers/dma/dw-edma/dw-edma-pcie.c
> > > index 0b30ce1385036..4ba368d18cb1d 100644
> > > --- a/drivers/dma/dw-edma/dw-edma-pcie.c
> > > +++ b/drivers/dma/dw-edma/dw-edma-pcie.c
> >
> > [ ... ]
> >
> > > @@ -547,6 +561,8 @@ static const struct pci_device_id
> > dw_edma_pcie_id_table[] = {
> > > { PCI_DEVICE_DATA(SYNOPSYS, EDDA, &snps_edda_data) },
> > > { PCI_VDEVICE(XILINX, PCI_DEVICE_ID_XILINX_B054),
> > > (kernel_ulong_t)&xilinx_mdb_data },
> > > + { PCI_VDEVICE(XILINX, PCI_DEVICE_ID_XILINX_B00F),
> > > + (kernel_ulong_t)&xilinx_cpm6_dma_data },
> >
> > [Severity: High]
> > This is a pre-existing issue, but adding this new device ID exposes the new
> > device to an IRQ resource leak in dw_edma_pcie_probe().
> >
> > When the device is probed, dw_edma_pcie_probe() successfully allocates
> > IRQs via pci_alloc_irq_vectors(). However, several subsequent error paths
> > return directly without calling pci_free_irq_vectors().
> >
> > For example, if the pcim_iomap_table() lookup fails:
> >
> > drivers/dma/dw-edma/dw-edma-pcie.c:dw_edma_pcie_probe() {
> > ...
> > chip->reg_base = pcim_iomap_table(pdev)[vsec_data->rg.bar];
> > if (!chip->reg_base)
> > return -ENOMEM;
> > ...
> > }
> >
> > Or if the main eDMA probe fails later on:
> >
> > drivers/dma/dw-edma/dw-edma-pcie.c:dw_edma_pcie_probe() {
> > ...
> > err = dw_edma_probe(chip);
> > if (err) {
> > pci_err(pdev, "eDMA probe failed\n");
> > return err;
> > }
> > ...
> > }
> >
> > Does this code leak the allocated IRQ vectors in these error paths? Because
> > IRQs are a strictly limited resource, repeated probe failures (such as deferred
> > probe or unbind/rebind cycles) could silently exhaust the system's IRQ
> > capacity.
> >
> > Would it make sense to ensure pci_free_irq_vectors() is called on all error
> > paths after successful allocation before enabling new devices?
> >
> > > { }
> > > };
> > > MODULE_DEVICE_TABLE(pci, dw_edma_pcie_id_table);
> >
> > --
> > Sashiko AI review · https://sashiko.dev/#/patchset/20260603143158.3243500-
> > 1-devendra.verma@amd.com?part=1
--
~Vinod
next prev parent reply other threads:[~2026-06-04 15:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 14:31 [PATCH v1] dmaengine: dw-edma: Add Xilinx CPM6-DMA DeviceID Devendra K Verma
2026-06-03 14:44 ` sashiko-bot
2026-06-04 12:12 ` Verma, Devendra
2026-06-04 15:35 ` Vinod Koul [this message]
2026-06-05 11:27 ` Verma, Devendra
2026-06-04 19:48 ` Frank Li
2026-06-05 11:28 ` Verma, Devendra
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=aiGbShotOS4usSdm@vaman \
--to=vkoul@kernel.org \
--cc=Devendra.Verma@amd.com \
--cc=Frank.Li@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.