Re: [PATCH for-linus v2 2/3] PCI: Honor Max Link Speed when determining supported speeds

Niklas Schnelle
2024-12-15T20:56:11Z

On Sun, 2024-12-15 at 11:20 +0100, Lukas Wunner wrote:
> The Supported Link Speeds Vector in the Link Capabilities 2 Register
> indicates the *supported* link speeds. The Max Link Speed field in
> the Link Capabilities Register indicates the *maximum* of those speeds.
>
> pcie_get_supported_speeds() neglects to honor the Max Link Speed field
> and will thus incorrectly deem higher speeds as supported. Fix it.
>
> One user-visible issue addressed here is an incorrect value in the sysfs
> attribute "max_link_speed".

Can confirm that I saw this effect on my affected Intel JHL7540 "Titan
Ridge 2018" Thunderbolt controller.

Feel free to add:

Tested-by: Niklas Schnelle <niks@kernel.org>