Commit 868c3b95 authored by ChunHao Lin's avatar ChunHao Lin Committed by Jakub Kicinski

r8169: fix network lost after resume on DASH systems

Device that support DASH may be reseted or powered off during suspend.
So driver needs to handle DASH during system suspend and resume. Or
DASH firmware will influence device behavior and causes network lost.

Fixes: b646d900 ("r8169: magic.")
Cc: stable@vger.kernel.org
Reviewed-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarChunHao Lin <hau@realtek.com>
Link: https://lore.kernel.org/r/20231109173400.4573-3-hau@realtek.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0ab0c45d
......@@ -4661,10 +4661,16 @@ static void rtl8169_down(struct rtl8169_private *tp)
rtl8169_cleanup(tp);
rtl_disable_exit_l1(tp);
rtl_prepare_power_down(tp);
if (tp->dash_type != RTL_DASH_NONE)
rtl8168_driver_stop(tp);
}
static void rtl8169_up(struct rtl8169_private *tp)
{
if (tp->dash_type != RTL_DASH_NONE)
rtl8168_driver_start(tp);
pci_set_master(tp->pci_dev);
phy_init_hw(tp->phydev);
phy_resume(tp->phydev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment