From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) (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 071EB26E6EB for ; Sat, 15 Nov 2025 09:49:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763200183; cv=none; b=qXZTxqJ70u3opkp3oYFOaLvjJnVraKTMY3QovWDwJkFjlQ+/3X7IjhrNQBSJkCusIdMF54gZFU6dYJs98iqcniKuqia4HFT/YKUZOrcV1XjkXVaS4Ly6hUCGJVdvxedJVDyYV6rHDzHtyo5tVV2eyLcy+oNjlH5QvW2ALQsLahk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763200183; c=relaxed/simple; bh=pzql7SHdC4gyXabGm1aAvDmdKPa3cQ9FY4OzZp2mAac=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aN96OcxqwTOf63Q+FREHtu8ck5OU3yQFrXaY5/EVQHqKX3fKsigc4DR9mqO/AftsKNT7/ov/3NWWad9Bte88kEie67BJoqd1YnqXGw5UXPhVhPMo5GPSW1iatGLd9ixGWmyYnRzY4tSnBqHJU4Mpz2hQiM616cyU5Z8f5714Nkk= 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=a6i4zfta; arc=none smtp.client-ip=209.85.216.43 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="a6i4zfta" Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-340e525487eso1816764a91.3 for ; Sat, 15 Nov 2025 01:49:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763200181; x=1763804981; 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=wE07oQibqqeqSQy9mXIzB1NU0J0tg0hcvxGPotz1NFE=; b=a6i4zftaTyuecD3ZKhqMneWz3+8+Kfdpvdqmpfp3dwUrUMJNBYLv6iCWBgLkuRQURp DYsxLWY0HL6D156HQLjFCwD7BJnBVMiYrW7ZdJvdmHoV3XULK6pTK+B8AAQyevxGVKns pYg1Mlh5iE9PM3JGbZpJThZ0g5wDodyYbgizDnoZjdVnLXif42dwtUL0WKKleDqBRoTE fn1hyVE8myU/ALLX2QRCm0wOvapWNEV5ZXqkllIypHoOxNsNgrwC2ozHxJhsVgJHpg28 Yp4sTnHKXg+ghnAg4xVzXsRwVlDr3LoxHGARigByeiRq9J35XkWo0TJTgklyGCfgthfI JKOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763200181; x=1763804981; 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=wE07oQibqqeqSQy9mXIzB1NU0J0tg0hcvxGPotz1NFE=; b=pdD0BJcex11ZxQxuUhu1s8vme3IMgDAXmWag+49ZVMuZC2spglSP843g99m0IVX/Ga A/oZpsUK+XBlPfeA4c+35W76wXrWdTsPgNkTRR1X4AioBpkzn4qWzvdIoDdPljDPrZU5 nqdLAjr46Kwic4LmrDLjnKLtfY+7iH6AJi6lHwvChw65PrktHofyMonhSlCAqI+qngzO mOaRah/P6FWnkD4mJxmR/8EFtcFZoXRbffsa8PNE0xnURKjUKaXcr7p3+qq45ACH+mEI +4AyeVlo7Lyz/XriJZYnBs6l5y36yWXCw/VLpXkg6/UYfaItmEjY4VS4YVpugkKGsRhN fHnw== X-Forwarded-Encrypted: i=1; AJvYcCXv4+MGgSAlypVv8GoaCsB2YLJQ+g5cvChGUVj3sO1rCVD+Iqfy0DeJGfGNLjRutR8hoWZisg41kar1Lyg=@vger.kernel.org X-Gm-Message-State: AOJu0YzCVtP/6WkysgJNrT9mwBv0d+NZ3poymRAvR3YEz0Z8as9ntXKD OtsKOVmG4DNhkms59Q8vewM21g8EHfEJ4/aFOg1msQy0SxWnPYWOMvsj X-Gm-Gg: ASbGncum427KXFuR5kTh566S/Jt3kyg7I3vdyiJGqBPemytAGcmgMuY9WEehBQ3f8dr hddIbr9+5gDdZAak3f6QKhCGz5sNb1buD8iB6b/iro4y3RELneV3Adk7JHNwK17uBm/PoAfdjAo IsPhozBW7Fhx0AE0uRvSNVR4hX63pusejxaS7T3CoGWCqLHKLEiurmevJU0WYwe21Jc4rWKP0YG 5IlyjPeYnnef+mgrDWs8+e/blDHbv4rcJ6YtpfAxEz82byX19yDTafElBy6RXuJPQCrE8+NicEi YqaOKDt4/3pMzFSrUTb4PfEPKRPP4fhHYau8K+eG78MBDi29hLA7+Pt0+FpSVE8VVYEH2sURl/w JjWbq1/hhfO0yaIj+hPXQA5sTF5dX6S5fijlJtuP9zMy5JBhdFXs0gwhQwwAt2lLAQ7HchoVnOw == X-Google-Smtp-Source: AGHT+IH17OP8J1VVJXCEJ0MIe3g5xMSq/3p+n5rpNXju3JOpEjrQNJV81hmioCrP4BodIIfRH/nioQ== X-Received: by 2002:a05:7022:43a6:b0:119:e56b:957b with SMTP id a92af1059eb24-11b40b29d05mr3386170c88.0.1763200181160; Sat, 15 Nov 2025 01:49:41 -0800 (PST) Received: from geday ([2804:7f2:800b:a121::dead:c001]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-11b060885c0sm23755473c88.3.2025.11.15.01.49.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Nov 2025 01:49:40 -0800 (PST) Date: Sat, 15 Nov 2025 06:49:33 -0300 From: Geraldo Nascimento To: Dragan Simic Cc: linux-rockchip@lists.infradead.org, Shawn Lin , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Heiko Stuebner , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Krzysztof Kozlowski , Conor Dooley , Johan Jonker Subject: Re: [PATCH 1/3] PCI: rockchip: warn of danger of 5.0 GT/s speeds Message-ID: 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: On Sat, Nov 15, 2025 at 10:24:49AM +0100, Dragan Simic wrote: > Hello Geraldo, > > On Saturday, November 15, 2025 10:10 CET, Geraldo Nascimento wrote: > > Shawn Lin from Rockchip has reiterated that there may be danger in using > > their PCIe with 5.0 GT/s speeds. Warn the user if they make a DT change > > from the default and at the same time, drive at 2.5 GT/s only, in case > > the DT max-link-speed property is invalid or inexistent. > > > > Fixes: 956cd99b35a8 ("PCI: rockchip: Separate common code from RC driver") > > Link: https://lore.kernel.org/all/ffd05070-9879-4468-94e3-b88968b4c21b@rock-chips.com/ > > Reported-by: Shawn Lin > > Signed-off-by: Geraldo Nascimento > > --- > > drivers/pci/controller/pcie-rockchip.c | 8 ++++++-- > > 1 file changed, 6 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/pci/controller/pcie-rockchip.c b/drivers/pci/controller/pcie-rockchip.c > > index 0f88da378805..ed67886a6d43 100644 > > --- a/drivers/pci/controller/pcie-rockchip.c > > +++ b/drivers/pci/controller/pcie-rockchip.c > > @@ -66,8 +66,12 @@ int rockchip_pcie_parse_dt(struct rockchip_pcie *rockchip) > > } > > > > rockchip->link_gen = of_pci_get_max_link_speed(node); > > - if (rockchip->link_gen < 0 || rockchip->link_gen > 2) > > - rockchip->link_gen = 2; > > + if (rockchip->link_gen < 0 || rockchip->link_gen > 2) { > > + rockchip->link_gen = 1; > > + dev_warn(dev, "invalid max-link-speed, set to 2.5 GT/s\n"); > > + } > > + else if (rockchip->link_gen == 2) > > + dev_warn(dev, "5.0 GT/s may lead to catastrophic failure\n"); > > > > for (i = 0; i < ROCKCHIP_NUM_PM_RSTS; i++) > > rockchip->pm_rsts[i].id = rockchip_pci_pm_rsts[i]; > > Looking good to me, thanks for this patch! People often declare > PCIe Gen2 on RK3399-based boards as "works for me", which actually > happens very often, but such simple evaluations cannot be taken > as a proof of Gen2 correctness. > > Furthermore, RK3399's internal interconnects limit the effective > I/O speed of PCIe transfers already, so switching to PCIe Gen1 > actually doesn't result in some large I/O performance penalties. > > With all that in mind, please feel free to include > > Reviewed-by: Dragan Simic Hi Dragan, I think I'll include a Reported-By: you too, since you were the first to warn me of unknown errata regarding Rockchip PCIe. I told you it was a test of mine but I didn't realize the grave danger implied by Shawn Lin declarations. Once I realized this could end badly the only way I could retribute was to send a few corrections :) Thank you, Geraldo Nascimento