Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH v2] PCI/PTM: Do not enable PTM solely based on the capability existense
Date: Tue, 28 Oct 2025 10:53:44 +0100	[thread overview]
Message-ID: <aQCSqKm8gaUtuD-6@wunner.de> (raw)
In-Reply-To: <20251028060427.2163115-1-mika.westerberg@linux.intel.com>

On Tue, Oct 28, 2025 at 07:04:27AM +0100, Mika Westerberg wrote:
> It is not advisable to enable PTM solely based on the fact that the
> capability exists. Instead there are separate bits in the capability
> register that need to be set for the feature to be enabled for a given
> component (this is suggestion from Intel PCIe folks):
> 
>   - PCIe Endpoint that has PTM capability must to declare requester
>     capable
>   - PCIe Switch Upstream Port that has PTM capability must declare
>     at least responder capable
>   - PCIe Root Port must declare root port capable.
[...]
> This happens because Linux sees the PTM capability and blindly enables
> PTM which then causes the AER error to trigger.
> 
> Fix this by enabling PTM only if the above described criteria is met.
> 
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Reviewed-by: Lukas Wunner <lukas@wunner.de>

A stable designation might be merited, it looks like we've been doing
this wrong since forever:

Fixes: 9bb04a0c4e26 ("PCI: Add Precision Time Measurement (PTM) support")
Cc: stable@vger.kernel.org  # v4.9+

A spec reference in the commit message may also be helpful:

PCIe r7.0 sec 6.21.1 figure 6-21

I guess Bjorn could add those when applying if he deems them necessary,
so probably no reason to respin just for that.

Thanks,

Lukas

  reply	other threads:[~2025-10-28  9:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-28  6:04 [PATCH v2] PCI/PTM: Do not enable PTM solely based on the capability existense Mika Westerberg
2025-10-28  9:53 ` Lukas Wunner [this message]
2025-10-28 17:06 ` Bjorn Helgaas
2025-10-29  5:33   ` Mika Westerberg
2025-10-29 10:53     ` Lukas Wunner
2025-10-29 11:20       ` Mika Westerberg

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=aQCSqKm8gaUtuD-6@wunner.de \
    --to=lukas@wunner.de \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.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