From nobody Tue Apr 7 18:47:01 2026 Received: from mail-vk1-f172.google.com (mail-vk1-f172.google.com [209.85.221.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB33A36215F for ; Fri, 27 Feb 2026 05:36:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772170598; cv=none; b=bqldHUwUgv1pXC/kC+vz19Ht8nFkhq1UdFg3Go2Izt1PzYcP6aAl5T2R5s2qCXDcN23fJMRgvyNksha5ttNiP0P/TlL3is/yOF6CGPZaZKh04kYZz/AKJbgE1SP1ihY5M8acPKGvmtKZrwvxqK6op6WJBWfhAzu7EFnoaLI920U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772170598; c=relaxed/simple; bh=AJDezbdBSE4yYAAwHOt3MOZ3kgfMlnzZJDtkUSMJC2Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Wxm7bSmBkH8QfHD0Dp0q4hWxyy9KoJLWKoeoanXy0RKZ1V5/jyF9P8Ay2RDD+qyB1MNJaadjtfir3S0fkAih7pXaGf0PZlfz3aLLqDsy1nkC96m0Gudh3mhYNHEZ828kJZTxLpKNk1wliwBJmSd3tltqIcuSUbMDeI/KDK9+CtA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lCZu9AeE; arc=none smtp.client-ip=209.85.221.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lCZu9AeE" Received: by mail-vk1-f172.google.com with SMTP id 71dfb90a1353d-56a976305b3so980162e0c.1 for ; Thu, 26 Feb 2026 21:36:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772170596; x=1772775396; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=7ahdwK5YE/BVFVzjUz+/VzjFDN6Ot/+6hz0uB3cz4GE=; b=lCZu9AeEvwlnqyzvbQ+3w7MhcIU4VlCdRUy2sBiOTOlu2SyiQGEexznBbAHLZDj3cR 37JzHMiHF/uRPclSZXQBRhBC6GaoBGJkPixStAFJAl3BYJYCPqQDWS6g4UrXyCNPR1P0 eXfj4ecwu8y4mS8St0W3+BxQScT2je45Zt0D24fCc1i/UcgSCyE9Q+i1g8YzmOu4Psua bmyWp4PPxV0R2j8oHhyDPpF7o9WOYMMuSRoUmLuRsGJOv5lC77tNu9VI6ehdCOJmfbCh 04srIholeF8Z34wbxJfCQM1CuIdZbUi1VkfZYag5aWXY8aHz5q9X9yUGqwwiWwIvg3KG 3Ypw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772170596; x=1772775396; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7ahdwK5YE/BVFVzjUz+/VzjFDN6Ot/+6hz0uB3cz4GE=; b=V0eFhSyVzVf7bMvFt+1/piHS9rUq1zh8fASkAD3gfPjjLT2UUv5c/PShebQNspklEq +WqSYWAurdrzEF612qLx139le1T/GPGXtCaZk3NpxOiNhtmIh25brQlOl/ak5gbRNDA/ FZZZeuooGbQU7/0pyQMIbxbcHtH9aOoi1tNzWXF8PsNwJ5Phi1AGucpsLj8MopGBbzI9 qt+0M1iAhZ+ba0OQEsdn3+12JuQq36wMFJqfXIoR+6A0fzZUq4iaSS9SQzzIuUMyrGOI PRmrZ1iR09iqdgsYSOivfVlqwxbHccjMv/GuySulIxm5vJEHLrtVaFaKdNQCBz89N/RN G8Vg== X-Forwarded-Encrypted: i=1; AJvYcCWBn9rszheU+JIYjdEcyCZUUYyKtqcYtj6RW5H6rEouILTpK1tA2+owfrOT6i6uqrskkhdEVqsvPyPVt/M=@vger.kernel.org X-Gm-Message-State: AOJu0YyaNvKnkA6HWBC05ZPN3+6lDx/BwgPNxqkJYMGaodVUZLYWoEUg 0qAqXw7r/K3o/DtGTXJo6i9ProJAIKWYcOZgMa8iGkyiJqBlwzRGgETb X-Gm-Gg: ATEYQzyi5mIfUA3nN2W6Nn0PRVVoc/CRxKdgSgTr+igz3/24oDJ5BF/5j2Pn12GCqVa 8NvUdbPofyH2cQTDxwRpBGD2XCDNOGgJwZyim4PAIgxP5mubGO+ZcGWMQaMRYFlVAOIY59SaMOf e67mz4pcIvh9Te5gLttqPSRPAjURBA8JoZEXaD9ISKlFkacC8ovlXVDzUGLGsEQidHDph37PCZr Mm1vsMpz1n1JF0YN1u2qXVShGIQG8PMWVTDYQk7nKJWDX32cuibz16thjNeni9eNhLIcqwZ3a6W xMslCqaqftlv5+4PSrggfrdJKN5fZxDzOZ/FOQHn41xceMUr9lveld0HlpSjK6jpcZy/AhDR2b6 TLu8XO4LUHwWmTzll/KJpwyHV9mGito91FOaAPZmW960ZIYEyfnNcHM//DDvYFiHiyWvLBD2BlZ Fh/ARez2TOFg== X-Received: by 2002:a05:6102:a4c:b0:5f7:2430:5340 with SMTP id ada2fe7eead31-5ff324986b1mr1096585137.21.1772170595887; Thu, 26 Feb 2026 21:36:35 -0800 (PST) Received: from geday ([2804:7f2:800b:feb1::dead:c001]) by smtp.gmail.com with ESMTPSA id ada2fe7eead31-5ff1e8240d2sm4431027137.6.2026.02.26.21.36.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 21:36:34 -0800 (PST) Date: Fri, 27 Feb 2026 02:36:27 -0300 From: Geraldo Nascimento To: Shawn Lin , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Heiko Stuebner , Geraldo Nascimento , Dragan Simic Cc: linux-rockchip@lists.infradead.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 3/4] PCI: rockchip-host: do not attempt 5.0 GT/s retraining Message-ID: <92662fce5ebb28d21d0c68631a23ab8afb815a90.1772169998.git.geraldogabriel@gmail.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Drop the 5.0 GT/s Link Speed retraining from Rockchip PCIe Root Complex Mode Operation, so called host driver. 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. 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@rock= -chips.com/ Cc: stable@vger.kernel.org Reported-by: Dragan Simic Reported-by: Shawn Lin Signed-off-by: Geraldo Nascimento --- drivers/pci/controller/pcie-rockchip-host.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/drivers/pci/controller/pcie-rockchip-host.c b/drivers/pci/cont= roller/pcie-rockchip-host.c index ee1822ca01db..1374a2c92b56 100644 --- a/drivers/pci/controller/pcie-rockchip-host.c +++ b/drivers/pci/controller/pcie-rockchip-host.c @@ -328,26 +328,6 @@ static int rockchip_pcie_host_init_port(struct rockchi= p_pcie *rockchip) goto err_power_off_phy; } =20 - if (rockchip->link_gen =3D=3D 2) { - /* - * Enable retrain for gen2. This should be configured only after - * gen1 finished. - */ - status =3D rockchip_pcie_read(rockchip, PCIE_RC_CONFIG_CR + PCI_EXP_LNKC= TL2); - status &=3D ~PCI_EXP_LNKCTL2_TLS; - status |=3D PCI_EXP_LNKCTL2_TLS_5_0GT; - rockchip_pcie_write(rockchip, status, PCIE_RC_CONFIG_CR + PCI_EXP_LNKCTL= 2); - status =3D rockchip_pcie_read(rockchip, PCIE_RC_CONFIG_CR + PCI_EXP_LNKC= TL); - status |=3D PCI_EXP_LNKCTL_RL; - rockchip_pcie_write(rockchip, status, PCIE_RC_CONFIG_CR + PCI_EXP_LNKCTL= ); - - err =3D readl_poll_timeout(rockchip->apb_base + PCIE_CORE_CTRL, - status, PCIE_LINK_IS_GEN2(status), 20, - 500 * USEC_PER_MSEC); - if (err) - dev_dbg(dev, "PCIe link training gen2 timeout, fall back to gen1!\n"); - } - /* Check the final link width from negotiated lane counter from MGMT */ status =3D rockchip_pcie_read(rockchip, PCIE_CORE_CTRL); status =3D 0x1 << ((status & PCIE_CORE_PL_CONF_LANE_MASK) >> --=20 2.52.0