From: Frank Li <Frank.li@nxp.com>
To: Aksh Garg <a-garg7@ti.com>
Cc: linux-pci@vger.kernel.org, jingoohan1@gmail.com, mani@kernel.org,
lpieralisi@kernel.org, kwilczynski@kernel.org, robh@kernel.org,
bhelgaas@google.com, cassel@kernel.org, Zhiqiang.Hou@nxp.com,
gustavo.pimentel@synopsys.com, den@valinux.co.jp,
linux-kernel@vger.kernel.org, s-vadapalli@ti.com,
danishanwar@ti.com
Subject: Re: [PATCH v5 3/3] PCI: dwc: ep: Add comment explaining controller-level PTM access
Date: Fri, 30 Jan 2026 12:48:03 -0500 [thread overview]
Message-ID: <aXzu05DSpiIgWSB4@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20260130115516.515082-4-a-garg7@ti.com>
On Fri, Jan 30, 2026 at 05:25:16PM +0530, Aksh Garg wrote:
> PCIe r6.0, section 7.9.15 requires PTM capability in exactly one
> function to control all PTM-capable functions. This makes PTM registers
> controller-level rather than per-function.
>
> Add a comment explaining why PTM capability registers are accessed
> using the standard DBI accessors instead of func_no indexed
> per-function accessors.
>
> Suggested-by: Niklas Cassel <cassel@kernel.org>
> Signed-off-by: Aksh Garg <a-garg7@ti.com>
> Reviewed-by: Niklas Cassel <cassel@kernel.org>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
>
> Changes from v4 to v5:
> - None
>
> Changes from v3 to v4:
> - Rebase
>
> Changes from v2 to v3:
> - Fixed the suggested nits
>
> v4: https://lore.kernel.org/all/20260129091753.490167-4-a-garg7@ti.com/
> v3: https://lore.kernel.org/all/20260127085010.446116-4-a-garg7@ti.com/
> v2: https://lore.kernel.org/all/20260122082538.309122-4-a-garg7@ti.com/
>
> drivers/pci/controller/dwc/pcie-designware-ep.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c
> index 6d3c35dd280f..dd48e60b513c 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-ep.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c
> @@ -1187,6 +1187,16 @@ int dw_pcie_ep_init_registers(struct dw_pcie_ep *ep)
> if (ep->ops->init)
> ep->ops->init(ep);
>
> + /*
> + * PCIe r6.0, section 7.9.15 states that for endpoints that support PTM,
> + * this capability structure is required in exactly one function, which
> + * controls the PTM behavior of all PTM capable functions. This indicates
> + * the PTM capability structure represents controller-level registers
> + * rather than per-function registers.
> + *
> + * Therefore, PTM capability registers are configured using the standard DBI
> + * accessors, instead of func_no indexed per-function accessors.
> + */
> ptm_cap_base = dw_pcie_find_ext_capability(pci, PCI_EXT_CAP_ID_PTM);
>
> /*
> --
> 2.34.1
>
next prev parent reply other threads:[~2026-01-30 17:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-30 11:55 [PATCH v5 0/3] PCI: dwc: ep: Enhance multi-function endpoint support Aksh Garg
2026-01-30 11:55 ` [PATCH v5 1/3] PCI: dwc: ep: Fix resizable BAR support for multi-PF configurations Aksh Garg
2026-01-30 17:43 ` Frank Li
2026-01-30 11:55 ` [PATCH v5 2/3] PCI: dwc: ep: Add per-PF BAR and inbound ATU mapping support Aksh Garg
2026-01-30 17:47 ` Frank Li
2026-01-30 11:55 ` [PATCH v5 3/3] PCI: dwc: ep: Add comment explaining controller-level PTM access Aksh Garg
2026-01-30 17:48 ` Frank Li [this message]
2026-01-30 14:34 ` [PATCH v5 0/3] PCI: dwc: ep: Enhance multi-function endpoint support Manivannan Sadhasivam
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=aXzu05DSpiIgWSB4@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=Zhiqiang.Hou@nxp.com \
--cc=a-garg7@ti.com \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=danishanwar@ti.com \
--cc=den@valinux.co.jp \
--cc=gustavo.pimentel@synopsys.com \
--cc=jingoohan1@gmail.com \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=robh@kernel.org \
--cc=s-vadapalli@ti.com \
/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®