Re: [PATCH v4 4/4] PCI: rockchip-ep: do not attempt 5.0 GT/s retraining
From: Charalampos Mitrodimas
Date: Fri Feb 27 2026 - 12:04:47 EST
Geraldo Nascimento <geraldogabriel@xxxxxxxxx> writes:
> Drop the 5.0 GT/s Link Speed retraining code block from Rockchip PCIe
> header definitions. The reason is that Shawn Lin from Rockchip has
> reiterated that there may be danger of "catastrophic failure" in
> using their PCIe with 5.0 GT/s speeds.
Patch body says "header definitions" but the change is to the drivers'
source. Maybe you need to reword in a way that is clear as to what
happened?
Cheers!
>
> While Rockchip has done so informally without issuing a proper
> errata, and the particulars are thus unknown, this may cause data
> loss or worse.
>
> This change is corroborated by RK3399 official datasheet [1], which
> states maximum link speed for this platform is 2.5 GT/s.
>
> [1] https://opensource.rock-chips.com/images/d/d7/Rockchip_RK3399_Datasheet_V2.1-20200323.pdf
>
> Link: https://lore.kernel.org/all/ffd05070-9879-4468-94e3-b88968b4c21b@xxxxxxxxxxxxxx/
> Cc: stable@xxxxxxxxxxxxxxx
> Reported-by: Dragan Simic <dsimic@xxxxxxxxxxx>
> Reported-by: Shawn Lin <shawn.lin@xxxxxxxxxxxxxx>
> Signed-off-by: Geraldo Nascimento <geraldogabriel@xxxxxxxxx>
> ---
> drivers/pci/controller/pcie-rockchip-ep.c | 13 -------------
> 1 file changed, 13 deletions(-)
>
> diff --git a/drivers/pci/controller/pcie-rockchip-ep.c b/drivers/pci/controller/pcie-rockchip-ep.c
> index 799461335762..9ebc227a1ef8 100644
> --- a/drivers/pci/controller/pcie-rockchip-ep.c
> +++ b/drivers/pci/controller/pcie-rockchip-ep.c
> @@ -553,19 +553,6 @@ static void rockchip_pcie_ep_link_training(struct work_struct *work)
> if (ret)
> goto again;
>
> - /*
> - * Check the current speed: if gen2 speed was requested and we are not
> - * at gen2 speed yet, retrain again for gen2.
> - */
> - val = rockchip_pcie_read(rockchip, PCIE_CORE_CTRL);
> - if (!PCIE_LINK_IS_GEN2(val) && rockchip->link_gen == 2) {
> - /* Enable retrain for gen2 */
> - rockchip_pcie_ep_retrain_link(rockchip);
> - readl_poll_timeout(rockchip->apb_base + PCIE_CORE_CTRL,
> - val, PCIE_LINK_IS_GEN2(val), 50,
> - LINK_TRAIN_TIMEOUT);
> - }
> -
> /* Check again that the link is up */
> if (!rockchip_pcie_ep_link_up(rockchip))
> goto again;