summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/realtek
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2021-04-07 18:53:52 +0300
committerJakub Kicinski <kuba@kernel.org>2021-04-10 02:37:05 +0300
commit5c2280fc2ee4c6f0ee1f0d0adf6b76f1023b5e99 (patch)
tree11de227d4635e2aea55f610232933eccc265b44a /drivers/net/ethernet/realtek
parent557d5dc83f6831b4e54d141e9b121850406f9a60 (diff)
downloadlinux-5c2280fc2ee4c6f0ee1f0d0adf6b76f1023b5e99.tar.xz
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 <hkallweit1@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/realtek')
-rw-r--r--drivers/net/ethernet/realtek/r8169_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 1cd5c6f6d44f..85031b4721fa 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);