* [PATCH net-next] r8169: move enabling EEE to rtl8169_init_phy
@ 2019-12-21 13:15 Heiner Kallweit
2019-12-25 6:27 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2019-12-21 13:15 UTC (permalink / raw)
To: Realtek linux nic maintainers, David Miller; +Cc: netdev
Simplify the code by moving the call to rtl_enable_eee() from the
individual PHY configs to rtl8169_init_phy().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/ethernet/realtek/r8169_main.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 38a09b5ee..0161d839f 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -2951,7 +2951,6 @@ static void rtl8168e_2_hw_phy_config(struct rtl8169_private *tp)
r8168d_phy_param(phydev, 0x8b85, 0x0000, 0x4000);
rtl8168f_config_eee_phy(tp);
- rtl_enable_eee(tp);
/* Green feature */
rtl_writephy(tp, 0x1f, 0x0003);
@@ -2978,7 +2977,6 @@ static void rtl8168f_hw_phy_config(struct rtl8169_private *tp)
r8168d_phy_param(phydev, 0x8b86, 0x0000, 0x0001);
rtl8168f_config_eee_phy(tp);
- rtl_enable_eee(tp);
}
static void rtl8168f_1_hw_phy_config(struct rtl8169_private *tp)
@@ -3124,14 +3122,12 @@ static void rtl8168g_1_hw_phy_config(struct rtl8169_private *tp)
rtl8168g_disable_aldps(tp);
rtl8168g_config_eee_phy(tp);
- rtl_enable_eee(tp);
}
static void rtl8168g_2_hw_phy_config(struct rtl8169_private *tp)
{
rtl_apply_firmware(tp);
rtl8168g_config_eee_phy(tp);
- rtl_enable_eee(tp);
}
static void rtl8168h_1_hw_phy_config(struct rtl8169_private *tp)
@@ -3198,7 +3194,6 @@ static void rtl8168h_1_hw_phy_config(struct rtl8169_private *tp)
rtl8168g_disable_aldps(tp);
rtl8168h_config_eee_phy(tp);
- rtl_enable_eee(tp);
}
static u16 rtl8168h_2_get_adc_bias_ioffset(struct rtl8169_private *tp)
@@ -3253,7 +3248,6 @@ static void rtl8168h_2_hw_phy_config(struct rtl8169_private *tp)
rtl8168g_disable_aldps(tp);
rtl8168g_config_eee_phy(tp);
- rtl_enable_eee(tp);
}
static void rtl8168ep_1_hw_phy_config(struct rtl8169_private *tp)
@@ -3276,7 +3270,6 @@ static void rtl8168ep_1_hw_phy_config(struct rtl8169_private *tp)
rtl8168g_disable_aldps(tp);
rtl8168g_config_eee_phy(tp);
- rtl_enable_eee(tp);
}
static void rtl8168ep_2_hw_phy_config(struct rtl8169_private *tp)
@@ -3328,7 +3321,6 @@ static void rtl8168ep_2_hw_phy_config(struct rtl8169_private *tp)
rtl8168g_disable_aldps(tp);
rtl8168g_config_eee_phy(tp);
- rtl_enable_eee(tp);
}
static void rtl8117_hw_phy_config(struct rtl8169_private *tp)
@@ -3368,7 +3360,6 @@ static void rtl8117_hw_phy_config(struct rtl8169_private *tp)
rtl8168g_disable_aldps(tp);
rtl8168h_config_eee_phy(tp);
- rtl_enable_eee(tp);
}
static void rtl8102e_hw_phy_config(struct rtl8169_private *tp)
@@ -3475,7 +3466,6 @@ static void rtl8125_1_hw_phy_config(struct rtl8169_private *tp)
phy_modify_paged(phydev, 0xa44, 0x11, 0x0000, 0x0800);
rtl8125_config_eee_phy(tp);
- rtl_enable_eee(tp);
}
static void rtl8125_2_hw_phy_config(struct rtl8169_private *tp)
@@ -3541,7 +3531,6 @@ static void rtl8125_2_hw_phy_config(struct rtl8169_private *tp)
phy_modify_paged(phydev, 0xa44, 0x11, 0x0000, 0x0800);
rtl8125_config_eee_phy(tp);
- rtl_enable_eee(tp);
}
static void rtl_hw_phy_config(struct net_device *dev)
@@ -3630,6 +3619,9 @@ static void rtl8169_init_phy(struct net_device *dev, struct rtl8169_private *tp)
/* We may have called phy_speed_down before */
phy_speed_up(tp->phydev);
+ if (rtl_supports_eee(tp))
+ rtl_enable_eee(tp);
+
genphy_soft_reset(tp->phydev);
}
--
2.24.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] r8169: move enabling EEE to rtl8169_init_phy
2019-12-21 13:15 [PATCH net-next] r8169: move enabling EEE to rtl8169_init_phy Heiner Kallweit
@ 2019-12-25 6:27 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-12-25 6:27 UTC (permalink / raw)
To: hkallweit1; +Cc: nic_swsd, netdev
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Sat, 21 Dec 2019 14:15:21 +0100
> Simplify the code by moving the call to rtl_enable_eee() from the
> individual PHY configs to rtl8169_init_phy().
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-25 6:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-21 13:15 [PATCH net-next] r8169: move enabling EEE to rtl8169_init_phy Heiner Kallweit
2019-12-25 6:27 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).