[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6d9956bc-6816-4726-9bcd-03bce1b9f027@gmail.com>
Date: Sun, 12 Oct 2025 23:45:26 +0200
From: Heiner Kallweit <hkallweit1@...il.com>
To: Linmao Li <lilinmao@...inos.cn>, netdev@...r.kernel.org
Cc: jacob.e.keller@...el.com, pabeni@...hat.com, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org
Subject: Re: [PATCH net v2] r8169: fix packet truncation after S4 resume on
RTL8168H/RTL8111H
On 10/9/2025 2:25 PM, Linmao Li wrote:
> 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.
>
Seems to be some chip quirk, as the RxConfig register is re-initialized,
just after the hw reset.
> This follows the same pattern as commit ef9da46ddef0 ("r8169: fix data
> corruption issue on RTL8402").
>
I wonder whether more chip versions are affected.
What we can do: Apply this as fix for RTL_GIGA_MAC_VER_46 in net.
Then switch to unconditionally calling rtl_init_rxcfg() in net-next.
> Fixes: 6e1d0b898818 ("r8169:add support for RTL8168H and RTL8107E")
> Signed-off-by: Linmao Li <lilinmao@...inos.cn>
> Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
> ---
> drivers/net/ethernet/realtek/r8169_main.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
> index 9c601f271c02..4b0ac73565ea 100644
> --- a/drivers/net/ethernet/realtek/r8169_main.c
> +++ b/drivers/net/ethernet/realtek/r8169_main.c
> @@ -4994,8 +4994,9 @@ static int rtl8169_resume(struct device *device)
> if (!device_may_wakeup(tp_to_dev(tp)))
> clk_prepare_enable(tp->clk);
>
> - /* Reportedly at least Asus X453MA truncates packets otherwise */
> - if (tp->mac_version == RTL_GIGA_MAC_VER_37)
> + /* Some chip versions may truncate packets without this initialization */
> + if (tp->mac_version == RTL_GIGA_MAC_VER_37 ||
> + tp->mac_version == RTL_GIGA_MAC_VER_46)
> rtl_init_rxcfg(tp);
>
> return rtl8169_runtime_resume(device);
Powered by blists - more mailing lists