Commit b6c7fa40 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

r8169: enable EEE per default on chip versions from RTL8168g

Enable EEE per default on chip versions from RTL8168g.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent df6f1856
...@@ -2172,6 +2172,14 @@ static const struct ethtool_ops rtl8169_ethtool_ops = { ...@@ -2172,6 +2172,14 @@ static const struct ethtool_ops rtl8169_ethtool_ops = {
.set_link_ksettings = phy_ethtool_set_link_ksettings, .set_link_ksettings = phy_ethtool_set_link_ksettings,
}; };
static void rtl_enable_eee(struct rtl8169_private *tp)
{
int supported = rtl_get_eee_supp(tp);
if (supported > 0)
rtl_set_eee_adv(tp, supported);
}
static void rtl8169_get_mac_version(struct rtl8169_private *tp) static void rtl8169_get_mac_version(struct rtl8169_private *tp)
{ {
/* /*
...@@ -3623,12 +3631,14 @@ static void rtl8168g_1_hw_phy_config(struct rtl8169_private *tp) ...@@ -3623,12 +3631,14 @@ static void rtl8168g_1_hw_phy_config(struct rtl8169_private *tp)
rtl8168g_disable_aldps(tp); rtl8168g_disable_aldps(tp);
rtl8168g_config_eee_phy(tp); rtl8168g_config_eee_phy(tp);
rtl_enable_eee(tp);
} }
static void rtl8168g_2_hw_phy_config(struct rtl8169_private *tp) static void rtl8168g_2_hw_phy_config(struct rtl8169_private *tp)
{ {
rtl_apply_firmware(tp); rtl_apply_firmware(tp);
rtl8168g_config_eee_phy(tp); rtl8168g_config_eee_phy(tp);
rtl_enable_eee(tp);
} }
static void rtl8168h_1_hw_phy_config(struct rtl8169_private *tp) static void rtl8168h_1_hw_phy_config(struct rtl8169_private *tp)
...@@ -3735,6 +3745,7 @@ static void rtl8168h_1_hw_phy_config(struct rtl8169_private *tp) ...@@ -3735,6 +3745,7 @@ static void rtl8168h_1_hw_phy_config(struct rtl8169_private *tp)
rtl8168g_disable_aldps(tp); rtl8168g_disable_aldps(tp);
rtl8168g_config_eee_phy(tp); rtl8168g_config_eee_phy(tp);
rtl_enable_eee(tp);
} }
static void rtl8168h_2_hw_phy_config(struct rtl8169_private *tp) static void rtl8168h_2_hw_phy_config(struct rtl8169_private *tp)
...@@ -3804,6 +3815,7 @@ static void rtl8168h_2_hw_phy_config(struct rtl8169_private *tp) ...@@ -3804,6 +3815,7 @@ static void rtl8168h_2_hw_phy_config(struct rtl8169_private *tp)
rtl8168g_disable_aldps(tp); rtl8168g_disable_aldps(tp);
rtl8168g_config_eee_phy(tp); rtl8168g_config_eee_phy(tp);
rtl_enable_eee(tp);
} }
static void rtl8168ep_1_hw_phy_config(struct rtl8169_private *tp) static void rtl8168ep_1_hw_phy_config(struct rtl8169_private *tp)
...@@ -3833,6 +3845,7 @@ static void rtl8168ep_1_hw_phy_config(struct rtl8169_private *tp) ...@@ -3833,6 +3845,7 @@ static void rtl8168ep_1_hw_phy_config(struct rtl8169_private *tp)
rtl8168g_disable_aldps(tp); rtl8168g_disable_aldps(tp);
rtl8168g_config_eee_phy(tp); rtl8168g_config_eee_phy(tp);
rtl_enable_eee(tp);
} }
static void rtl8168ep_2_hw_phy_config(struct rtl8169_private *tp) static void rtl8168ep_2_hw_phy_config(struct rtl8169_private *tp)
...@@ -3911,6 +3924,7 @@ static void rtl8168ep_2_hw_phy_config(struct rtl8169_private *tp) ...@@ -3911,6 +3924,7 @@ static void rtl8168ep_2_hw_phy_config(struct rtl8169_private *tp)
rtl8168g_disable_aldps(tp); rtl8168g_disable_aldps(tp);
rtl8168g_config_eee_phy(tp); rtl8168g_config_eee_phy(tp);
rtl_enable_eee(tp);
} }
static void rtl8102e_hw_phy_config(struct rtl8169_private *tp) static void rtl8102e_hw_phy_config(struct rtl8169_private *tp)
......
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