From a389731bcd6513b0f206a57165ecc250215b980d Mon Sep 17 00:00:00 2001 From: Denis Kirjanov Date: Feb 08 2024 13:46:51 +0000 Subject: r8169: fix data corruption issue on RTL8402 (git-fixes). --- diff --git a/patches.suse/r8169-fix-data-corruption-issue-on-RTL8402.patch b/patches.suse/r8169-fix-data-corruption-issue-on-RTL8402.patch new file mode 100644 index 0000000..d9d1c4d --- /dev/null +++ b/patches.suse/r8169-fix-data-corruption-issue-on-RTL8402.patch @@ -0,0 +1,41 @@ +From 7b8a48cf6f38ebf85e35b720d9528970b79dd622 Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Thu, 1 Oct 2020 09:23:02 +0200 +Subject: [PATCH] r8169: fix data corruption issue on RTL8402 +Git-commit: ef9da46ddef071e1bbb943afbbe9b38771855554 +Patch-mainline: v5.9 +References: git-fixes + +Petr reported that after resume from suspend RTL8402 partially +truncates incoming packets, and re-initializing register RxConfig +before the actual chip re-initialization sequence is needed to avoid +the issue. + +Reported-by: Petr Tesarik +Proposed-by: Petr Tesarik +Tested-by: Petr Tesarik +Signed-off-by: Heiner Kallweit +Signed-off-by: David S. Miller +Signed-off-by: Denis Kirjanov +--- + drivers/net/ethernet/realtek/r8169.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c +index 7fc5f683b9ee..0ca723eb58af 100644 +--- a/drivers/net/ethernet/realtek/r8169.c ++++ b/drivers/net/ethernet/realtek/r8169.c +@@ -7863,6 +7863,10 @@ static void __rtl8169_resume(struct net_device *dev) + { + struct rtl8169_private *tp = netdev_priv(dev); + ++ /* Reportedly at least Asus X453MA truncates packets otherwise */ ++ if (tp->mac_version == RTL_GIGA_MAC_VER_37) ++ rtl_init_rxcfg(tp); ++ + netif_device_attach(dev); + + rtl_pll_power_up(tp); +-- +2.16.4 + diff --git a/series.conf b/series.conf index 6affbfe..8b5f02f 100644 --- a/series.conf +++ b/series.conf @@ -58621,6 +58621,7 @@ patches.suse/team-set-dev-needed_headroom-in-team_setup_by_port.patch patches.suse/mdio-fix-mdio-thunder.c-dependency-build-error.patch patches.suse/net-usb-ax88179_178a-fix-missing-stop-entry-in-drive.patch + patches.suse/r8169-fix-data-corruption-issue-on-RTL8402.patch patches.suse/0002-net-introduce-helper-sendpage_ok-in-include-linux-ne.patch patches.suse/0003-net-add-WARN_ONCE-in-kernel_sendpage-for-improper-ze.patch patches.suse/0004-nvme-tcp-check-page-by-sendpage_ok-before-calling-ke.patch