From: Heiner Kallweit Date: Wed, 7 Apr 2021 15:53:52 +0000 (+0200) Subject: r8169: use mac-managed PHY PM X-Git-Tag: accepted/tizen/unified/20230118.172025~7335^2~194^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5c2280fc2ee4c6f0ee1f0d0adf6b76f1023b5e99;p=platform%2Fkernel%2Flinux-rpi.git r8169: use mac-managed PHY PM Use the new mac_managed_pm flag to indicate that the driver takes care of PHY power management. Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index 1cd5c6f..85031b4 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -4660,6 +4660,7 @@ static void rtl8169_down(struct rtl8169_private *tp) static void rtl8169_up(struct rtl8169_private *tp) { pci_set_master(tp->pci_dev); + phy_init_hw(tp->phydev); phy_resume(tp->phydev); rtl8169_init_phy(tp); napi_enable(&tp->napi); @@ -5085,6 +5086,8 @@ static int r8169_mdio_register(struct rtl8169_private *tp) return -EUNATCH; } + tp->phydev->mac_managed_pm = 1; + /* PHY will be woken up in rtl_open() */ phy_suspend(tp->phydev);