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
Subject: Re: [PATCH V2 RESEND] PCI/TPH: Skip Root Port completer check for RC_END devices
Date: Wed, 18 Feb 2026 14:58:58 -0600 [thread overview]
Message-ID: <20260218205858.GA3443049@bhelgaas> (raw)
In-Reply-To: <20260109052923.1170070-1-george.abraham.p@intel.com>
On Fri, Jan 09, 2026 at 10:59:23AM +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.
>
> Fixes: f69767a1ada3 ("PCI: Add TLP Processing Hints (TPH) support")
> Signed-off-by: George Abraham P <george.abraham.p@intel.com>
Applied to pci/enumeration with the following commit log for v7.1,
thanks! This will be rebased after v7.0-rc1.
PCI/TPH: Allow TPH enable for RCiEPs
Previously, pcie_enable_tph() only enabled TLP Processing Hints (TPH) if
both the Endpoint and its Root Port advertised TPH support.
Root Complex Integrated Endpoints (RCiEPs) are directly integrated into a
Root Complex and do not have an associated Root Port, so pcie_enable_tph()
never enabled TPH for RCiEPs.
PCIe r7.0 doesn't seem to include a way to learn whether a Root Complex
supports TPH, but sec 2.2.7.1.1 says Functions that lack TPH support should
ignore TPH, and maybe the same is true for Root Complexes:
A Function that does not support the TPH Completer or Routing capability
and receives a transaction with the TH bit [which indicates the presence
of TPH in the TLP header] Set is required to ignore the TH bit and handle
the Request in the same way as Requests of the same transaction type
without the TH bit Set.
Allow drivers to enable TPH for any RCiEP with a TPH Requester Capability.
> ---
> v1->v2:
> - Added "Fixes:" tag to link the commit hash that introduced the code
> ---
> 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 ca4f97be7538..e896b3958281 100644
> --- a/drivers/pci/tph.c
> +++ b/drivers/pci/tph.c
> @@ -407,10 +407,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;
> --
> 2.40.1
>
prev parent reply other threads:[~2026-02-18 20:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-09 5:29 George Abraham P
2026-02-18 4:54 ` George Abraham P
2026-02-18 8:42 ` Leon Romanovsky
2026-02-18 15:30 ` George Abraham P
2026-02-27 7:08 ` Wei Huang
2026-02-18 20:58 ` Bjorn Helgaas [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=20260218205858.GA3443049@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=george.abraham.p@intel.com \
--cc=giovanni.cabiddu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.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®