From: Bjorn Helgaas <helgaas@kernel.org>
To: George Abraham P <george.abraham.p@intel.com>
Cc: bhelgaas@google.com, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, giovanni.cabiddu@intel.com,
Wei Huang <wei.huang2@amd.com>, Jing Liu <jing2.liu@intel.com>,
Paul Luse <paul.e.luse@linux.intel.com>,
Eric Van Tassell <Eric.VanTassell@amd.com>,
Yishai Hadas <yishaih@nvidia.com>,
Leon Romanovsky <leon@kernel.org>
Subject: Re: [PATCH] PCI/TPH: Skip Root Port completer check for RC_END devices
Date: Thu, 18 Sep 2025 14:28:54 -0500 [thread overview]
Message-ID: <20250918192854.GA1916809@bhelgaas> (raw)
In-Reply-To: <20250918084940.1334124-1-george.abraham.p@intel.com>
[+cc authors of TPH support]
On Thu, Sep 18, 2025 at 02:19:40PM +0530, George Abraham P wrote:
> Root Complex Integrated Endpoint devices (PCI_EXP_TYPE_RC_END) are
> directly integrated into the root complex and do not have an
> associated Root Port in the traditional PCIe hierarchy. The current
> TPH implementation incorrectly attempts to find and check a Root Port's
> TPH completer capability for these devices.
>
> Add a check to skip Root Port completer type verification for RC_END
> devices, allowing them to use their full TPH requester capability
> without being limited by a non-existent Root Port's completer support.
>
> For RC_END devices, the root complex itself acts as the TPH completer,
> and this relationship is handled differently than the standard
> endpoint-to-Root-Port model.
I thought maybe the spec would mention TPH Completer Supported for a
Root Complex in an RCRB, but I looked through PCIe r7.0 and didn't see
anything in RCRB related to the Root Port TPH Completer Supported
field in Device Capabilities 2.
It seems sort of surprising that Root Ports have to advertise what
kinds of TPH Completers they support, but we can assume that Root
Complexes support both TPH and Extended TPH Completers. Do you have
any insight into that?
But I certainly agree that as-is, TPH is useless for RCiEPs since
there's no Root Port, so we assume the completer has no TPH Completer
support at all.
Do you think we should add a Fixes: tag for f69767a1ada3 ("PCI: Add
TLP Processing Hints (TPH) support"), where the TPH support was added?
> Signed-off-by: George Abraham P <george.abraham.p@intel.com>
> ---
> drivers/pci/tph.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/tph.c b/drivers/pci/tph.c
> index cc64f93709a4..c61456d24f61 100644
> --- a/drivers/pci/tph.c
> +++ b/drivers/pci/tph.c
> @@ -397,10 +397,13 @@ int pcie_enable_tph(struct pci_dev *pdev, int mode)
> else
> pdev->tph_req_type = PCI_TPH_REQ_TPH_ONLY;
>
> - rp_req_type = get_rp_completer_type(pdev);
> + /* Check if the device is behind a Root Port */
> + if (pci_pcie_type(pdev) != PCI_EXP_TYPE_RC_END) {
> + rp_req_type = get_rp_completer_type(pdev);
>
> - /* Final req_type is the smallest value of two */
> - pdev->tph_req_type = min(pdev->tph_req_type, rp_req_type);
> + /* Final req_type is the smallest value of two */
> + pdev->tph_req_type = min(pdev->tph_req_type, rp_req_type);
> + }
>
> if (pdev->tph_req_type == PCI_TPH_REQ_DISABLE)
> return -EINVAL;
>
> base-commit: c29008e61d8e75ac7da3efd5310e253c035e0458
> --
> 2.40.1
>
next prev parent reply other threads:[~2025-09-18 19:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 8:49 [PATCH] PCI/TPH: Skip Root Port completer check for RC_END devices George Abraham P
2025-09-18 19:28 ` Bjorn Helgaas [this message]
2025-09-19 4:35 ` George Abraham P
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=20250918192854.GA1916809@bhelgaas \
--to=helgaas@kernel.org \
--cc=Eric.VanTassell@amd.com \
--cc=bhelgaas@google.com \
--cc=george.abraham.p@intel.com \
--cc=giovanni.cabiddu@intel.com \
--cc=jing2.liu@intel.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=paul.e.luse@linux.intel.com \
--cc=wei.huang2@amd.com \
--cc=yishaih@nvidia.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