r8169: load firmware for RTL8168fp/RTL8117
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 15 Nov 2019 21:38:25 +0000 (22:38 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 16 Nov 2019 21:11:40 +0000 (13:11 -0800)
Load Realtek-provided firmware for RTL8168fp/RTL8117. Unlike the
firmware for other chip versions which is for the PHY, firmware for
RTL8168fp/RTL8117 is for the MAC.

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

index cf13eb2153526f531c7f53f6743a0b053341ce46..d8fcdb9db8d1272777fe9f5f67f323ded4466718 100644 (file)
@@ -52,6 +52,7 @@
 #define FIRMWARE_8168G_3       "rtl_nic/rtl8168g-3.fw"
 #define FIRMWARE_8168H_1       "rtl_nic/rtl8168h-1.fw"
 #define FIRMWARE_8168H_2       "rtl_nic/rtl8168h-2.fw"
+#define FIRMWARE_8168FP_3      "rtl_nic/rtl8168fp-3.fw"
 #define FIRMWARE_8107E_1       "rtl_nic/rtl8107e-1.fw"
 #define FIRMWARE_8107E_2       "rtl_nic/rtl8107e-2.fw"
 #define FIRMWARE_8125A_3       "rtl_nic/rtl8125a-3.fw"
@@ -203,7 +204,7 @@ static const struct {
        [RTL_GIGA_MAC_VER_49] = {"RTL8168ep/8111ep"                     },
        [RTL_GIGA_MAC_VER_50] = {"RTL8168ep/8111ep"                     },
        [RTL_GIGA_MAC_VER_51] = {"RTL8168ep/8111ep"                     },
-       [RTL_GIGA_MAC_VER_52] = {"RTL8117"                              },
+       [RTL_GIGA_MAC_VER_52] = {"RTL8168fp/RTL8117",  FIRMWARE_8168FP_3},
        [RTL_GIGA_MAC_VER_60] = {"RTL8125"                              },
        [RTL_GIGA_MAC_VER_61] = {"RTL8125",             FIRMWARE_8125A_3},
 };
@@ -715,6 +716,7 @@ MODULE_FIRMWARE(FIRMWARE_8168G_2);
 MODULE_FIRMWARE(FIRMWARE_8168G_3);
 MODULE_FIRMWARE(FIRMWARE_8168H_1);
 MODULE_FIRMWARE(FIRMWARE_8168H_2);
+MODULE_FIRMWARE(FIRMWARE_8168FP_3);
 MODULE_FIRMWARE(FIRMWARE_8107E_1);
 MODULE_FIRMWARE(FIRMWARE_8107E_2);
 MODULE_FIRMWARE(FIRMWARE_8125A_3);
@@ -4883,6 +4885,9 @@ static void rtl_hw_start_8117(struct rtl8169_private *tp)
        r8168_mac_ocp_write(tp, 0xc094, 0x0000);
        r8168_mac_ocp_write(tp, 0xc09e, 0x0000);
 
+       /* firmware is for MAC only */
+       rtl_apply_firmware(tp);
+
        rtl_hw_aspm_clkreq_enable(tp, true);
 }