From 3cf47cb17662aa9d345205ad2f245afb23f22b7b Mon Sep 17 00:00:00 2001 From: David Bauer Date: Mon, 27 Jul 2020 21:34:24 +0200 Subject: [PATCH] arm64: dts: rockchip: Add txpbl node for RK3399/RK3328 Some rockchip SoCs like the RK3399 and RK3328 exhibit an issue where tx checksumming does not work with packets larger than 1498. The default Programmable Buffer Length for TX in these GMAC's is not suitable for MTUs higher than 1498. The workaround is to disable TX offloading with 'ethtool -K eth0 tx off rx off' causing performance impacts as it disables hardware checksumming. This patch sets snps,txpbl to 0x4 which is a safe number tested ok for the most popular MTU value of 1500. For reference, see https://lkml.org/lkml/2019/4/1/1382. Signed-off-by: Carlos de Paula Link: https://lore.kernel.org/r/20200218221040.10955-1-me@carlosedp.com Signed-off-by: Heiko Stuebner Signed-off-by: David Bauer --- ...hip-Add-txpbl-node-for-RK3399-RK3328.patch | 54 +++++++++++++++++++ ...r8152-add-LED-configuration-from-OF.patch} | 0 ...t-add-RTL8152-binding-documentation.patch} | 0 3 files changed, 54 insertions(+) create mode 100644 target/linux/rockchip/patches-5.4/004-arm64-dts-rockchip-Add-txpbl-node-for-RK3399-RK3328.patch rename target/linux/rockchip/patches-5.4/{004-net-usb-r8152-add-LED-configuration-from-OF.patch => 005-net-usb-r8152-add-LED-configuration-from-OF.patch} (100%) rename target/linux/rockchip/patches-5.4/{005-dt-bindings-net-add-RTL8152-binding-documentation.patch => 006-dt-bindings-net-add-RTL8152-binding-documentation.patch} (100%) diff --git a/target/linux/rockchip/patches-5.4/004-arm64-dts-rockchip-Add-txpbl-node-for-RK3399-RK3328.patch b/target/linux/rockchip/patches-5.4/004-arm64-dts-rockchip-Add-txpbl-node-for-RK3399-RK3328.patch new file mode 100644 index 0000000000..8931d5c5a9 --- /dev/null +++ b/target/linux/rockchip/patches-5.4/004-arm64-dts-rockchip-Add-txpbl-node-for-RK3399-RK3328.patch @@ -0,0 +1,54 @@ +From 8a469ee35606ba65448d54e5a2a23302f7e79e3c Mon Sep 17 00:00:00 2001 +From: Carlos de Paula +Date: Tue, 18 Feb 2020 17:10:37 -0500 +Subject: [PATCH] arm64: dts: rockchip: Add txpbl node for RK3399/RK3328 + +Some rockchip SoCs like the RK3399 and RK3328 exhibit an issue +where tx checksumming does not work with packets larger than 1498. + +The default Programmable Buffer Length for TX in these GMAC's is +not suitable for MTUs higher than 1498. The workaround is to disable +TX offloading with 'ethtool -K eth0 tx off rx off' causing performance +impacts as it disables hardware checksumming. + +This patch sets snps,txpbl to 0x4 which is a safe number tested ok for +the most popular MTU value of 1500. + +For reference, see https://lkml.org/lkml/2019/4/1/1382. + +Signed-off-by: Carlos de Paula +Link: https://lore.kernel.org/r/20200218221040.10955-1-me@carlosedp.com +Signed-off-by: Heiko Stuebner +--- + arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 ++ + arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 + + 2 files changed, 3 insertions(+) + +--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi +@@ -857,6 +857,7 @@ + resets = <&cru SRST_GMAC2IO_A>; + reset-names = "stmmaceth"; + rockchip,grf = <&grf>; ++ snps,txpbl = <0x4>; + status = "disabled"; + }; + +@@ -878,6 +879,7 @@ + reset-names = "stmmaceth", "mac-phy"; + phy-mode = "rmii"; + phy-handle = <&phy>; ++ snps,txpbl = <0x4>; + status = "disabled"; + + mdio { +--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi +@@ -288,6 +288,7 @@ + resets = <&cru SRST_A_GMAC>; + reset-names = "stmmaceth"; + rockchip,grf = <&grf>; ++ snps,txpbl = <0x4>; + status = "disabled"; + }; + diff --git a/target/linux/rockchip/patches-5.4/004-net-usb-r8152-add-LED-configuration-from-OF.patch b/target/linux/rockchip/patches-5.4/005-net-usb-r8152-add-LED-configuration-from-OF.patch similarity index 100% rename from target/linux/rockchip/patches-5.4/004-net-usb-r8152-add-LED-configuration-from-OF.patch rename to target/linux/rockchip/patches-5.4/005-net-usb-r8152-add-LED-configuration-from-OF.patch diff --git a/target/linux/rockchip/patches-5.4/005-dt-bindings-net-add-RTL8152-binding-documentation.patch b/target/linux/rockchip/patches-5.4/006-dt-bindings-net-add-RTL8152-binding-documentation.patch similarity index 100% rename from target/linux/rockchip/patches-5.4/005-dt-bindings-net-add-RTL8152-binding-documentation.patch rename to target/linux/rockchip/patches-5.4/006-dt-bindings-net-add-RTL8152-binding-documentation.patch