004-arm64-dts-rockchip-Add-txpbl-node-for-RK3399-RK3328.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. Some rockchip SoCs like the RK3399 and RK3328 exhibit an issue
  6. where tx checksumming does not work with packets larger than 1498.
  7. The default Programmable Buffer Length for TX in these GMAC's is
  8. not suitable for MTUs higher than 1498. The workaround is to disable
  9. TX offloading with 'ethtool -K eth0 tx off rx off' causing performance
  10. impacts as it disables hardware checksumming.
  11. This patch sets snps,txpbl to 0x4 which is a safe number tested ok for
  12. the most popular MTU value of 1500.
  13. For reference, see https://lkml.org/lkml/2019/4/1/1382.
  14. Signed-off-by: Carlos de Paula <me@carlosedp.com>
  15. Link: https://lore.kernel.org/r/20200218221040.10955-1-me@carlosedp.com
  16. Signed-off-by: Heiko Stuebner <heiko@sntech.de>
  17. ---
  18. arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 ++
  19. arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 +
  20. 2 files changed, 3 insertions(+)
  21. --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
  22. +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
  23. @@ -729,6 +729,7 @@
  24. resets = <&cru SRST_GMAC2IO_A>;
  25. reset-names = "stmmaceth";
  26. rockchip,grf = <&grf>;
  27. + snps,txpbl = <0x4>;
  28. status = "disabled";
  29. };
  30. @@ -750,6 +751,7 @@
  31. reset-names = "stmmaceth", "mac-phy";
  32. phy-mode = "rmii";
  33. phy-handle = <&phy>;
  34. + snps,txpbl = <0x4>;
  35. status = "disabled";
  36. mdio {
  37. --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
  38. +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
  39. @@ -290,6 +290,7 @@
  40. resets = <&cru SRST_A_GMAC>;
  41. reset-names = "stmmaceth";
  42. rockchip,grf = <&grf>;
  43. + snps,txpbl = <0x4>;
  44. status = "disabled";
  45. };