From: Heiner Kallweit Date: Sun, 14 Feb 2021 16:38:30 +0000 (+0100) Subject: r8169: fix resuming from suspend on RTL8105e if machine runs on battery X-Git-Tag: howlett/maple/20220722_2~3823^2~46 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d2a04370817fc7b0172dad2ef2decf907e1a304e;p=users%2Fjedix%2Flinux-maple.git r8169: fix resuming from suspend on RTL8105e if machine runs on battery Armin reported that after referenced commit his RTL8105e is dead when resuming from suspend and machine runs on battery. This patch has been confirmed to fix the issue. Fixes: e80bd76fbf56 ("r8169: work around power-saving bug on some chip versions") Reported-by: Armin Wolf Tested-by: Armin Wolf Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index 9197da8e626a..44a438bad153 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -1252,6 +1252,7 @@ static void rtl_set_d3_pll_down(struct rtl8169_private *tp, bool enable) { switch (tp->mac_version) { case RTL_GIGA_MAC_VER_25 ... RTL_GIGA_MAC_VER_26: + case RTL_GIGA_MAC_VER_29 ... RTL_GIGA_MAC_VER_30: case RTL_GIGA_MAC_VER_32 ... RTL_GIGA_MAC_VER_37: case RTL_GIGA_MAC_VER_39 ... RTL_GIGA_MAC_VER_63: if (enable)