From: Heiner Kallweit Date: Thu, 1 Oct 2020 07:23:02 +0000 (+0200) Subject: r8169: fix data corruption issue on RTL8402 X-Git-Tag: v5.8.17~608 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd5743391b5ee8da92947b2911826ad714594bb0;p=thirdparty%2Fkernel%2Fstable.git r8169: fix data corruption issue on RTL8402 [ Upstream commit ef9da46ddef071e1bbb943afbbe9b38771855554 ] 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: Greg Kroah-Hartman --- diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index fe173ea894e2c..eba609bf4f1b9 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -4871,6 +4871,10 @@ static int __maybe_unused rtl8169_resume(struct device *device) if (netif_running(tp->dev)) __rtl8169_resume(tp); + /* Reportedly at least Asus X453MA truncates packets otherwise */ + if (tp->mac_version == RTL_GIGA_MAC_VER_37) + rtl_init_rxcfg(tp); + return 0; }