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 <ptesa...@suse.cz> Proposed-by: Petr Tesarik <ptesa...@suse.cz> Tested-by: Petr Tesarik <ptesa...@suse.cz> Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- Hard to provide a Fixes tag because it seems the issue has been always there. Due to frequent changes in function rtl8169_resume() we would need a number of different fixes for the stable kernel versions. That the issue was reported only now indicates that chip version RTL8402 is rare. Therefore treat this change mainly as an improvement. This fix version applies from 5.9 after just submitted fix "r8169: fix handling ether_clk". --- drivers/net/ethernet/realtek/r8169_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index 72351c5b0..0fa99298a 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -4848,6 +4848,10 @@ static int __maybe_unused 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) + rtl_init_rxcfg(tp); + return rtl8169_net_resume(tp); } -- 2.28.0