Re: [PATCH v8 4/5] PCI: controller: Validate max-link-speed

From: Florian Fainelli

Date: Thu Mar 12 2026 - 13:13:18 EST


On 3/12/26 09:36, Hans Zhang wrote:
Add validation for the "max-link-speed" DT property in three more
drivers, using the pcie_get_link_speed() helper.

- brcmstb: If the value is missing or invalid, fall back to no
limitation (pcie->gen = 0). Fix the previous incorrect logic.
- mediatek-gen3: If the value is missing or invalid, use the maximum
speed supported by the controller.
- rzg3s-host: If the value is missing or invalid, fall back to Gen2.

This ensures that all users of of_pci_get_max_link_speed() are ready
for the removal of the central range check.

Signed-off-by: Hans Zhang <18255117159@xxxxxxx>
---
drivers/pci/controller/pcie-brcmstb.c | 5 +++--

For pcie-brcmstb.c:

Reviewed-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
--
Florian