OSDN Git Service

r8169: enable EEE per default on RTL8168f
authorHeiner Kallweit <hkallweit1@gmail.com>
Sat, 26 Jan 2019 09:36:35 +0000 (10:36 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Jan 2019 17:19:39 +0000 (09:19 -0800)
Enable EEE per default on RTL8168f.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169.c

index 4572de1..3e650bd 100644 (file)
@@ -3388,23 +3388,7 @@ static void rtl8168e_2_hw_phy_config(struct rtl8169_private *tp)
        rtl_writephy(tp, 0x1f, 0x0000);
 
        rtl8168f_config_eee_phy(tp);
-
-       /* EEE setting */
-       rtl_w0w1_eri(tp, 0x1b0, ERIAR_MASK_1111, 0x0003, 0x0000, ERIAR_EXGMAC);
-       rtl_writephy(tp, 0x1f, 0x0005);
-       rtl_writephy(tp, 0x05, 0x8b85);
-       rtl_w0w1_phy(tp, 0x06, 0x2000, 0x0000);
-       rtl_writephy(tp, 0x1f, 0x0004);
-       rtl_writephy(tp, 0x1f, 0x0007);
-       rtl_writephy(tp, 0x1e, 0x0020);
-       rtl_w0w1_phy(tp, 0x15, 0x0100, 0x0000);
-       rtl_writephy(tp, 0x1f, 0x0002);
-       rtl_writephy(tp, 0x1f, 0x0000);
-       rtl_writephy(tp, 0x0d, 0x0007);
-       rtl_writephy(tp, 0x0e, 0x003c);
-       rtl_writephy(tp, 0x0d, 0x4007);
-       rtl_writephy(tp, 0x0e, 0x0006);
-       rtl_writephy(tp, 0x0d, 0x0000);
+       rtl_enable_eee(tp);
 
        /* Green feature */
        rtl_writephy(tp, 0x1f, 0x0003);
@@ -3441,6 +3425,7 @@ static void rtl8168f_hw_phy_config(struct rtl8169_private *tp)
        rtl_writephy(tp, 0x1f, 0x0000);
 
        rtl8168f_config_eee_phy(tp);
+       rtl_enable_eee(tp);
 }
 
 static void rtl8168f_1_hw_phy_config(struct rtl8169_private *tp)
@@ -3574,22 +3559,6 @@ static void rtl8411_hw_phy_config(struct rtl8169_private *tp)
        rtl_w0w1_phy(tp, 0x06, 0x8000, 0x0000);
        rtl_writephy(tp, 0x1f, 0x0000);
 
-       /* eee setting */
-       rtl_w0w1_eri(tp, 0x1b0, ERIAR_MASK_0001, 0x00, 0x03, ERIAR_EXGMAC);
-       rtl_writephy(tp, 0x1f, 0x0005);
-       rtl_writephy(tp, 0x05, 0x8b85);
-       rtl_w0w1_phy(tp, 0x06, 0x0000, 0x2000);
-       rtl_writephy(tp, 0x1f, 0x0004);
-       rtl_writephy(tp, 0x1f, 0x0007);
-       rtl_writephy(tp, 0x1e, 0x0020);
-       rtl_w0w1_phy(tp, 0x15, 0x0000, 0x0100);
-       rtl_writephy(tp, 0x1f, 0x0000);
-       rtl_writephy(tp, 0x0d, 0x0007);
-       rtl_writephy(tp, 0x0e, 0x003c);
-       rtl_writephy(tp, 0x0d, 0x4007);
-       rtl_writephy(tp, 0x0e, 0x0000);
-       rtl_writephy(tp, 0x0d, 0x0000);
-
        /* Green feature */
        rtl_writephy(tp, 0x1f, 0x0003);
        rtl_w0w1_phy(tp, 0x19, 0x0000, 0x0001);