mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3] arm64: dts: rockchip: increase gmac rx_delay on rk3399-puma
@ 2024-12-05 15:18 Jakob Unterwurzacher
  2024-12-05 15:24 ` Krzysztof Kozlowski
  2024-12-09 11:30 ` Quentin Schulz
  0 siblings, 2 replies; 3+ messages in thread
From: Jakob Unterwurzacher @ 2024-12-05 15:18 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Quentin Schulz, Iskander Amara, Sasha Levin,
	Jakob Unterwurzacher, Vahe Grigoryan, Klaus Goger
  Cc: stable, devicetree, linux-arm-kernel, linux-rockchip, linux-kernel

During mass manufacturing, we noticed the mmc_rx_crc_error counter,
as reported by "ethtool -S eth0 | grep mmc_rx_crc_error", to increase
above zero during nuttcp speedtests. Most of the time, this did not
affect the achieved speed, but it prompted this investigation.

Cycling through the rx_delay range on six boards (see table below) of
various ages shows that there is a large good region from 0x12 to 0x35
where we see zero crc errors on all tested boards.

The old rx_delay value (0x10) seems to have always been on the edge for
the KSZ9031RNX that is usually placed on Puma.

Choose "rx_delay = 0x23" to put us smack in the middle of the good
region. This works fine as well with the KSZ9131RNX PHY that was used
for a small number of boards during the COVID chip shortages.

	Board S/N        PHY        rx_delay good region
	---------        ---        --------------------
	Puma TT0069903   KSZ9031RNX 0x11 0x35
	Puma TT0157733   KSZ9031RNX 0x11 0x35
	Puma TT0681551   KSZ9031RNX 0x12 0x37
	Puma TT0681156   KSZ9031RNX 0x10 0x38
	Puma 17496030079 KSZ9031RNX 0x10 0x37 (Puma v1.2 from 2017)
	Puma TT0681720   KSZ9131RNX 0x02 0x39 (alternative PHY used in very few boards)

	Intersection of good regions = 0x12 0x35
	Middle of good region = 0x23

Relates-to: PUMA-111
Fixes: 2c66fc34e945 ("arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM")
Cc: <stable@vger.kernel.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@cherry.de>
---
v3: use rx_delay = 0x23 instead of 0x11, which was not enough.
v2: cc stable, add "Fixes:", add omitted "there" to commit msg,
    add Reviewed-by.

 arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
index 9efcdce0f593..f9b4cd2d7daa 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
@@ -181,7 +181,7 @@ &gmac {
 	snps,reset-active-low;
 	snps,reset-delays-us = <0 10000 50000>;
 	tx_delay = <0x10>;
-	rx_delay = <0x10>;
+	rx_delay = <0x23>;
 	status = "okay";
 };
 
-- 
2.39.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] arm64: dts: rockchip: increase gmac rx_delay on rk3399-puma
  2024-12-05 15:18 [PATCH v3] arm64: dts: rockchip: increase gmac rx_delay on rk3399-puma Jakob Unterwurzacher
@ 2024-12-05 15:24 ` Krzysztof Kozlowski
  2024-12-09 11:30 ` Quentin Schulz
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-05 15:24 UTC (permalink / raw)
  To: Jakob Unterwurzacher, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Heiko Stuebner, Quentin Schulz, Iskander Amara,
	Sasha Levin, Jakob Unterwurzacher, Vahe Grigoryan, Klaus Goger
  Cc: stable, devicetree, linux-arm-kernel, linux-rockchip, linux-kernel

On 05/12/2024 16:18, Jakob Unterwurzacher wrote:
> During mass manufacturing, we noticed the mmc_rx_crc_error counter,
> as reported by "ethtool -S eth0 | grep mmc_rx_crc_error", to increase
> above zero during nuttcp speedtests. Most of the time, this did not
> affect the achieved speed, but it prompted this investigation.
> 
> Cycling through the rx_delay range on six boards (see table below) of
> various ages shows that there is a large good region from 0x12 to 0x35
> where we see zero crc errors on all tested boards.
> 
> The old rx_delay value (0x10) seems to have always been on the edge for
> the KSZ9031RNX that is usually placed on Puma.
> 
> Choose "rx_delay = 0x23" to put us smack in the middle of the good
> region. This works fine as well with the KSZ9131RNX PHY that was used
> for a small number of boards during the COVID chip shortages.
> 
> 	Board S/N        PHY        rx_delay good region
> 	---------        ---        --------------------
> 	Puma TT0069903   KSZ9031RNX 0x11 0x35
> 	Puma TT0157733   KSZ9031RNX 0x11 0x35
> 	Puma TT0681551   KSZ9031RNX 0x12 0x37
> 	Puma TT0681156   KSZ9031RNX 0x10 0x38
> 	Puma 17496030079 KSZ9031RNX 0x10 0x37 (Puma v1.2 from 2017)
> 	Puma TT0681720   KSZ9131RNX 0x02 0x39 (alternative PHY used in very few boards)
> 
> 	Intersection of good regions = 0x12 0x35
> 	Middle of good region = 0x23
> 
> Relates-to: PUMA-111

Drop 3rd party tags.

Also you you CC-ed an address, which suggests you do not work on
mainline kernel or you do not use get_maintainers.pl/b4/patman.
Regardless of the reason, process needs improvement: please rebase and
always work on mainline or start using mentioned tools tools, so correct
addresses will be used.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] arm64: dts: rockchip: increase gmac rx_delay on rk3399-puma
  2024-12-05 15:18 [PATCH v3] arm64: dts: rockchip: increase gmac rx_delay on rk3399-puma Jakob Unterwurzacher
  2024-12-05 15:24 ` Krzysztof Kozlowski
@ 2024-12-09 11:30 ` Quentin Schulz
  1 sibling, 0 replies; 3+ messages in thread
From: Quentin Schulz @ 2024-12-09 11:30 UTC (permalink / raw)
  To: Jakob Unterwurzacher, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Heiko Stuebner, Iskander Amara, Sasha Levin,
	Jakob Unterwurzacher, Vahe Grigoryan, Klaus Goger
  Cc: stable, devicetree, linux-arm-kernel, linux-rockchip, linux-kernel

Hi Jakob,

On 12/5/24 4:18 PM, Jakob Unterwurzacher wrote:
> During mass manufacturing, we noticed the mmc_rx_crc_error counter,
> as reported by "ethtool -S eth0 | grep mmc_rx_crc_error", to increase
> above zero during nuttcp speedtests. Most of the time, this did not
> affect the achieved speed, but it prompted this investigation.
> 
> Cycling through the rx_delay range on six boards (see table below) of
> various ages shows that there is a large good region from 0x12 to 0x35
> where we see zero crc errors on all tested boards.
> 
> The old rx_delay value (0x10) seems to have always been on the edge for
> the KSZ9031RNX that is usually placed on Puma.
> 
> Choose "rx_delay = 0x23" to put us smack in the middle of the good
> region. This works fine as well with the KSZ9131RNX PHY that was used
> for a small number of boards during the COVID chip shortages.
> 
> 	Board S/N        PHY        rx_delay good region
> 	---------        ---        --------------------
> 	Puma TT0069903   KSZ9031RNX 0x11 0x35
> 	Puma TT0157733   KSZ9031RNX 0x11 0x35
> 	Puma TT0681551   KSZ9031RNX 0x12 0x37
> 	Puma TT0681156   KSZ9031RNX 0x10 0x38
> 	Puma 17496030079 KSZ9031RNX 0x10 0x37 (Puma v1.2 from 2017)
> 	Puma TT0681720   KSZ9131RNX 0x02 0x39 (alternative PHY used in very few boards)
> 
> 	Intersection of good regions = 0x12 0x35
> 	Middle of good region = 0x23
> 
> Relates-to: PUMA-111
> Fixes: 2c66fc34e945 ("arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM")
> Cc: <stable@vger.kernel.org>
> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
> Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@cherry.de>

I had reported errors on my v2.1 Puma (KSZ9031) but none on my v2.3 
before that patch, and have 0 after applying this patch on both, so 
improvement for v2.1 and no regression for v2.3.

I ran the nuttcp test for an hour, failed after a minute on master 
(without the patch) on v2.1 but not on v2.3 and it didn't report any 
issue after an hour after applying this patch, thus:

Tested-by: Quentin Schulz <quentin.schulz@cherry.de> # Puma v2.1/v2.3 
with KSZ9031

I assume Krzysztof complained about their old email address appearing in 
the Cc list (it was changed in 6.9 in MAINTAINERS file) which 
highlighted you didn't develop on master (I did test on master though). 
Please address their concern from their mail and send a v4.

Thanks!
Quentin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-09 11:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-05 15:18 [PATCH v3] arm64: dts: rockchip: increase gmac rx_delay on rk3399-puma Jakob Unterwurzacher
2024-12-05 15:24 ` Krzysztof Kozlowski
2024-12-09 11:30 ` Quentin Schulz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®