From nobody Tue Apr 7 18:46:56 2026 Received: from mail-ua1-f45.google.com (mail-ua1-f45.google.com [209.85.222.45]) (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 7590424503B for ; Sat, 28 Feb 2026 00:55:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772240128; cv=none; b=ZZMISoZ/3mLd0ux7eCOPc7FYNkq7rXtHBxuRW3Qi4lm2KuQKGRxwucsXhpdrgeVWS+Zh0UZJKKj6lM4W7Su1gBfKf6T2mjUXZmOyCtdyy1eCS4fMien42OQEBUn00QPGHYZmo+KuqcFJ07LneRmfH/C2au6R8AyjtnxoIN14n/w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772240128; c=relaxed/simple; bh=GFndJvD0S3ipzYYAdq+4KgS0M9aqAQasboqVroQdCZU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VdE+V/wpkp1iyhvrmYXAkztd3/ghO+enLeVy4xjZpSXN6a6mJ17kSQXwho9UYFIYE0MDzVsSnE+XEc9J6VkOEcvlH5Lcn7VIW2YsG3K21iCyJHsDT9A7//VJB6x22tYnO3313W7mwgOgnySsCNVzb0JpNoZaUxYsrJdDDXMt7To= 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=celMQwMr; arc=none smtp.client-ip=209.85.222.45 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="celMQwMr" Received: by mail-ua1-f45.google.com with SMTP id a1e0cc1a2514c-94ac3958788so1397124241.0 for ; Fri, 27 Feb 2026 16:55:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772240125; x=1772844925; 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=3by8dItpKgMsvPGS2Pus1C94W5lhtexananCbnyqhcM=; b=celMQwMr94Le3hC7Qy5ifsVgt77NHUcTs8kA+3ASHkQxfrAjCZbJhEqONbPPRQX8oH jYlwSTOmfvNIXD98YEFRUVnW5Z/iNSWl/va00oHp2UmkIrKprmV237ZzfTmZLHZ0iKq/ ZNaNgv4Z0Zr+kcu9aebvLEXrZek05FNTdLomqGlQFKXKqfW8EI+IMZWo55lYzus5t2e4 Z0byeAAzl4ei4u1U0u0rUEhSdjGJSP4ONdWwRodPvrceJmAMk8BLke5SHtNzvaNDkGba LIVVI9pPs3DeAPNe6gv7BXiZAjRzsvRA9g4VoBBrTZT5+KKBCG7DGA9ifJ8V0Q/xlDId xDQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772240125; x=1772844925; 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=3by8dItpKgMsvPGS2Pus1C94W5lhtexananCbnyqhcM=; b=QxaQpUFALOL0iMn7h/2vQIModfAzsl6knF9gi7ijhMAgZ1seua0dArAkFxUE3dMpaB iQa6CmyCaoTv68enQT8FkrzL2VXZR/g+DlJTNnW8D6zCC5N8qTxSW7Z+GA42T5cseiOL GKLOs9R5i51qcF/GOyiQoudQRzJ3MSc6cS+ypU5zd2Kbi97JGkFYguK7Qw/eUriaQGax fd9tSBn6setLm7k/YdzG5pwtLAmLqvPlNNU8W/OAIkSI6qiV0iJ0PiZRaGt77R5fHsrk unxAN+lYWIqfO+WTL7nDWsbjNO0oDbc506KS/sE8hsxzUX7P1Ss3QFnO8gv68ycv5Mpf emmQ== X-Forwarded-Encrypted: i=1; AJvYcCX+cPSYHG7G/p+AiZALX8eGa6/0kHIqyfFb0+KUnOtXWJ8h/OPxSGdMtutTTrH+fqVab1jZ0SWp1mB8KC0=@vger.kernel.org X-Gm-Message-State: AOJu0YzmlG+ipL3C9pAyt46S3d22X8FZAV8RlFhKuGdHpCSJ9B57Y9ax rVRKfVcqbfuUQYhMDM7QTPLy9BsgTVX8eHPqOiVh0Rn3t8lftZY3J8Oa X-Gm-Gg: ATEYQzx2WptQAE1Qoa9LOO116SHa36xC6jdJDbtqqINKQ04WQxH10QJYeRFMnxbmg/x yi6ve1jQpgzSq60+6n5SOLDNSUIMWOlOirLbSTQZbv3CJo4irw7hY9Gc9AhDOfUu8k4azgFXCWg I8DY8scKV0yKAk1nOQ+nUVhXpECJeLplQ/ysA3tw5R5VvT4Z+SQqFeK4o80ngfc2EckBgNARNha aBKmCqqpCUOJ5FuSsOQcjJmgRoF3voFRSkkl+ncRNkvX83W0vq6zhfLIx71WJ6r9eaNz0S3U8Y8 VEZkGRFUtKFwDkfSonZbEBC+4tWswq7xjoXP/2lDW+6TUXt8W9IunNounsJH5F22/sxWgvWQAfB kbpex9rjb0BCB9vIX0dpJU27FTK84tNRMGSL75f9e90BARJhMrudwOcVwmBeQM4Mfvf1aEc5Gip GAIoF9a0kxaA== X-Received: by 2002:a05:6102:3047:b0:5fe:f592:1626 with SMTP id ada2fe7eead31-5ff1cda9994mr5177242137.3.1772240125413; Fri, 27 Feb 2026 16:55:25 -0800 (PST) Received: from geday ([2804:7f2:800b:feb1::dead:c001]) by smtp.gmail.com with ESMTPSA id a1e0cc1a2514c-94df63d6695sm6182090241.1.2026.02.27.16.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Feb 2026 16:55:25 -0800 (PST) Date: Fri, 27 Feb 2026 21:55:19 -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 v5 2/4] PCI: rockchip-host: do not attempt 5.0 GT/s retraining Message-ID: <4fa2c439482725bb191a225a3966300cea253db1.1772239598.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.0GT/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