Skip to content

Commit 70f92ab

Browse files
Linmao Likuba-moo
authored andcommitted
r8169: fix packet truncation after S4 resume on RTL8168H/RTL8111H
After resume from S4 (hibernate), RTL8168H/RTL8111H truncates incoming packets. Packet captures show messages like "IP truncated-ip - 146 bytes missing!". The issue is caused by RxConfig not being properly re-initialized after resume. Re-initializing the RxConfig register before the chip re-initialization sequence avoids the truncation and restores correct packet reception. This follows the same pattern as commit ef9da46 ("r8169: fix data corruption issue on RTL8402"). Fixes: 6e1d0b8 ("r8169:add support for RTL8168H and RTL8107E") Signed-off-by: Linmao Li <lilinmao@kylinos.cn> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/20251009122549.3955845-1-lilinmao@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 25718fd commit 70f92ab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/net/ethernet/realtek/r8169_main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4994,8 +4994,9 @@ static int rtl8169_resume(struct device *device)
49944994
if (!device_may_wakeup(tp_to_dev(tp)))
49954995
clk_prepare_enable(tp->clk);
49964996

4997-
/* Reportedly at least Asus X453MA truncates packets otherwise */
4998-
if (tp->mac_version == RTL_GIGA_MAC_VER_37)
4997+
/* Some chip versions may truncate packets without this initialization */
4998+
if (tp->mac_version == RTL_GIGA_MAC_VER_37 ||
4999+
tp->mac_version == RTL_GIGA_MAC_VER_46)
49995000
rtl_init_rxcfg(tp);
50005001

50015002
return rtl8169_runtime_resume(device);

0 commit comments

Comments
 (0)