From: sashiko-bot@kernel.org
To: "Koichiro Den" <den@valinux.co.jp>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH v3 5/5] PCI: dwc: Implement endpoint DMA channel delegation
Date: Sat, 20 Jun 2026 17:16:53 +0000 [thread overview]
Message-ID: <20260620171654.4CD7C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260620170438.3756593-6-den@valinux.co.jp>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Calls to undeclared and undefined functions `dw_edma_request_delegated_chan` and `dw_edma_release_delegated_chan` will cause compilation and linking failures.
--
commit e55470d381c0b56d92a5e22c376824161b53e132
Author: Koichiro Den <den@valinux.co.jp>
PCI: dwc: Implement endpoint DMA channel delegation
This commit implements the EPC DMA channel delegation operations for
DesignWare endpoint controllers. It uses the local eDMA provider to reserve
hardware channels and returns them as opaque handles, limiting delegation
to PF0 and handling reclamation.
> diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c
> --- a/drivers/pci/controller/dwc/pcie-designware-ep.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c
[ ... ]
> +static int dw_pcie_ep_delegate_dma_chan(struct pci_epc *epc, u8 func_no,
> + u8 vfunc_no,
> + enum pci_epc_aux_dma_dir dir, u16 hw_ch,
> + void **data)
> +{
[ ... ]
> + switch (dir) {
> + case PCI_EPC_AUX_DMA_EP_TO_RC:
> + if (hw_ch >= edma->ll_wr_cnt)
> + return -EINVAL;
> + write = true;
> + break;
> + case PCI_EPC_AUX_DMA_RC_TO_EP:
> + if (hw_ch >= edma->ll_rd_cnt)
> + return -EINVAL;
> + write = false;
> + break;
> + default:
> + return -EINVAL;
> + }
> +
> + chan = dw_edma_request_delegated_chan(edma->dev, write, hw_ch);
[Severity: Low]
Are the definitions for dw_edma_request_delegated_chan() missing from this
commit? Calling undeclared and undefined functions in
dw_pcie_ep_delegate_dma_chan() will result in compilation and linking
failures.
> + if (!chan)
> + return -EBUSY;
> +
> + *data = chan;
> +
> + return 0;
> +}
> +
> +static void dw_pcie_ep_reclaim_dma_chan(struct pci_epc *epc, u8 func_no,
> + u8 vfunc_no, void *data, bool quiesce)
> +{
> + dw_edma_release_delegated_chan(data, quiesce);
[Severity: Low]
Does this code also rely on an undefined function? Like the request function
above, dw_edma_release_delegated_chan() appears to be undeclared in the
kernel tree at this point, which will break the build.
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260620170438.3756593-1-den@valinux.co.jp?part=5
prev parent reply other threads:[~2026-06-20 17:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-20 17:04 [PATCH v3 0/5] PCI: endpoint: Expose endpoint DMA resources (part 2/3) Koichiro Den
2026-06-20 17:04 ` [PATCH v3 1/5] PCI: endpoint: Define endpoint DMA BAR metadata format Koichiro Den
2026-06-20 17:10 ` sashiko-bot
2026-06-20 17:04 ` [PATCH v3 2/5] PCI: endpoint: Add DMA auxiliary resource metadata Koichiro Den
2026-06-20 17:09 ` sashiko-bot
2026-06-20 17:04 ` [PATCH v3 3/5] PCI: endpoint: Add API to delegate EPC DMA channels to the host Koichiro Den
2026-06-20 17:26 ` sashiko-bot
2026-06-20 17:04 ` [PATCH v3 4/5] PCI: dwc: Expose endpoint DMA resources Koichiro Den
2026-06-20 17:14 ` sashiko-bot
2026-06-20 17:04 ` [PATCH v3 5/5] PCI: dwc: Implement endpoint DMA channel delegation Koichiro Den
2026-06-20 17:16 ` sashiko-bot [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=20260620171654.4CD7C1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=den@valinux.co.jp \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox