From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) (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 8D752390CB9 for ; Thu, 11 Jun 2026 20:03:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781208204; cv=none; b=IzYYWHFyd9RusU02CCSIQh28Xy1C3m4jGhuUqF5tlUeSs5jYY4QeEFquPgzVmPpKbilOPILBOazQ15meyODvDOME7f+S8F9XLtFJI8MFlcDuU1MlqBxhb6N2XUaNuNuARYQlyMtWO7+R+hSa90fjorAcWwQlag3ztropwqAXJOY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781208204; c=relaxed/simple; bh=fgIo7UfPWRtYrXPLSBv62/AM988YKE4Nbo4xMqj8MRk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aNDYQ8TfLki0oUTd/t9iyyJJhmawF5qTcw9hdsgBmeDCfzFjg3GAYZQhiS4/pbU33DzTbw3cghzojcoRwp+pelMIYL/8Hhonye/UlCrAnqEjK+sNbXhIOMo/s+5m0hEXsJrC2exEYaMwUNb/IY6Vh1bxD3O0qIrkd+Uav2WE1gE= 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=hf+pb6zI; arc=none smtp.client-ip=209.85.219.50 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="hf+pb6zI" Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-8cceaa6f75bso3949316d6.0 for ; Thu, 11 Jun 2026 13:03:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781208198; x=1781812998; 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=qLMumJf1RKl2eLxtJE2mfNPELwqfdC4TqjLEXDZKRSI=; b=hf+pb6zI2JdXtu7YSZrKrLFg4/Dqmsq/LYcPJTpVIjQsu4UKfIy5AAuWcMTefVUDB1 ypfh5wXJQjdj/tKQBaoRRLLvxk8Ep8XwhISsqOdRykIdcEi6xHlmhLwXdh68Xr7r51mM fERD761F78eRjTzPlq5HpwPyfHmpxErM1Es3IrxCYTzff7gIVya64745rlMpjEAoKOe3 jzXGn3wCMRQh+UwBqhnkd0WRIC16g5zeX6QAGjk9li1z5QI9bFQyObjNobKYUVTJhHxe d4J0orW7f7/kuo/P5LwdYDOl3UjpXqQhK5+d5RueDwD1qYrBIAbaAi8wDWhkRsTrO6uD ioXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781208198; x=1781812998; 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=qLMumJf1RKl2eLxtJE2mfNPELwqfdC4TqjLEXDZKRSI=; b=JTsPWBDVIFvbdbYubmm3/GID4qAjAKKIto5RbzvLoFBTnwZwS2p8drfcble8xGkSH8 dgPPW0DaYAPcCd8K1DOxHSmVI5Q64FXfTo861ROn+2ZA89kF/MriP7+f/tGjsxNo0CmF +RCx6E+jFg87NAdndhPEUrk81twjv924QIqsfXghHAThp2CCSpvjggVhk0fSGJHv0qtO vqH07bQRDbsvwg1EABeJOA4Tz0NhsBjreIH2JxwgVKl8WNtSAH6e3lH122F3PGBAenet lH0XLg5bp+gQsXtMsrrw7q+yxxqwAvtihVveNUEbvAlw3heJYU3jRQjPstssi/TY6V0a ePag== X-Forwarded-Encrypted: i=1; AFNElJ+0AdHx9Fr77y4bJ6mpWdG/Xot8IU5fldB3hcb9UjwI0c55wVEuVd+bkBw/P4ExlWN36C7FUAND6H8SP1c=@vger.kernel.org X-Gm-Message-State: AOJu0YyD412BabT98rk6JvVq9EQ3zQgl3t/HLbEC1Q5b2cLHOjm2gu5P OA9xY0SvIDyWzg0ndwTMOzsFpzBHAQFUDa2sollfCx7ggqsFDw0bCN3zxuip7ESh X-Gm-Gg: Acq92OFxOjKnwpZ22umR61hipqR/Q5lmKDlqCG4k+Hsfi6EVmHVo4gGdj+r0W3n5XmG bSN3clsz8p8zOhow6CBUDCn+gnINaET45outbpUog8lGTDNvLnUYKF/BtT/F8lBvzHKe/Da/ef6 TzvoXOQi+0dU0b1UGS/08Ud4eAZ7Mfp0uqqwQEFLPUIrUZlOtANtjT2MAMZeo5HY804S6EzC15c 89KLTYJAJUZ46a7QgzZrcJVhlpC7jW5teeWjfZoGefIwZGJPa1n6v0QRlnh2tl19aKfvLRLAZlo GUPC7wnERWu7oJLsfUPcdFJb87Yn3k9krEx191L9tmLH/jenGBJJUiiS3xSAwpek0aaffit4d4E jlQG0MlYb4bDhDRlz4y8nZfRWLVcBO+zdQEAzZkpoB5XmCHQQxMc7jYVD7aXPoaXw/XNNc+Utdc uSpRleHqVx X-Received: by 2002:ad4:4ee6:0:b0:8cc:f135:529e with SMTP id 6a1803df08f44-8d1dc1a0cebmr77291506d6.34.1781208198118; Thu, 11 Jun 2026 13:03:18 -0700 (PDT) Received: from geday ([2804:7f2:800b:f09::dead:c001]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8d301b2a79asm3229516d6.13.2026.06.11.13.03.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 13:03:17 -0700 (PDT) Date: Thu, 11 Jun 2026 17:03:11 -0300 From: Geraldo Nascimento To: Shawn Lin , Dragan Simic Cc: linux-rockchip@lists.infradead.org, Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Geraldo Nascimento Subject: [PATCH v6 1/3] PCI: rockchip-ep: do not attempt 5.0 GT/s retraining Message-ID: <76c828d29b0f05df0970b3a862ee1af8c96faf17.1781207474.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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Drop the 5.0 GT/s Link Speed retraining code block from Rockchip PCIe EP 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-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 799461335762e..9ebc227a1ef84 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; -- 2.54.0