83ce8f1efb0c4a5c9b7a05ca6cb077ab16b68477
[openwrt/staging/mkresin.git] / target / linux / rockchip / patches-5.4 / 004-arm64-dts-rockchip-Add-txpbl-node-for-RK3399-RK3328.patch
1 From 8a469ee35606ba65448d54e5a2a23302f7e79e3c Mon Sep 17 00:00:00 2001
2 From: Carlos de Paula <me@carlosedp.com>
3 Date: Tue, 18 Feb 2020 17:10:37 -0500
4 Subject: [PATCH] arm64: dts: rockchip: Add txpbl node for RK3399/RK3328
5
6 Some rockchip SoCs like the RK3399 and RK3328 exhibit an issue
7 where tx checksumming does not work with packets larger than 1498.
8
9 The default Programmable Buffer Length for TX in these GMAC's is
10 not suitable for MTUs higher than 1498. The workaround is to disable
11 TX offloading with 'ethtool -K eth0 tx off rx off' causing performance
12 impacts as it disables hardware checksumming.
13
14 This patch sets snps,txpbl to 0x4 which is a safe number tested ok for
15 the most popular MTU value of 1500.
16
17 For reference, see https://lkml.org/lkml/2019/4/1/1382.
18
19 Signed-off-by: Carlos de Paula <me@carlosedp.com>
20 Link: https://lore.kernel.org/r/20200218221040.10955-1-me@carlosedp.com
21 Signed-off-by: Heiko Stuebner <heiko@sntech.de>
22 ---
23 arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 ++
24 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 +
25 2 files changed, 3 insertions(+)
26
27 --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
28 +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
29 @@ -857,6 +857,7 @@
30 resets = <&cru SRST_GMAC2IO_A>;
31 reset-names = "stmmaceth";
32 rockchip,grf = <&grf>;
33 + snps,txpbl = <0x4>;
34 status = "disabled";
35 };
36
37 @@ -878,6 +879,7 @@
38 reset-names = "stmmaceth", "mac-phy";
39 phy-mode = "rmii";
40 phy-handle = <&phy>;
41 + snps,txpbl = <0x4>;
42 status = "disabled";
43
44 mdio {
45 --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
46 +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
47 @@ -291,6 +291,7 @@
48 resets = <&cru SRST_A_GMAC>;
49 reset-names = "stmmaceth";
50 rockchip,grf = <&grf>;
51 + snps,txpbl = <0x4>;
52 status = "disabled";
53 };
54