diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/r8169.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 8ffd57324d66..e8960f294a6e 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -1243,6 +1243,16 @@ static void rtl8169sb_hw_phy_config(void __iomem *ioaddr) | |||
1243 | 1243 | ||
1244 | rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init)); | 1244 | rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init)); |
1245 | } | 1245 | } |
1246 | static void rtl8168b_hw_phy_config(void __iomem *ioaddr) | ||
1247 | { | ||
1248 | struct phy_reg phy_reg_init[] = { | ||
1249 | { 0x1f, 0x0000 }, | ||
1250 | { 0x10, 0xf41b }, | ||
1251 | { 0x1f, 0x0000 } | ||
1252 | }; | ||
1253 | |||
1254 | rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init)); | ||
1255 | } | ||
1246 | 1256 | ||
1247 | static void rtl8168cp_hw_phy_config(void __iomem *ioaddr) | 1257 | static void rtl8168cp_hw_phy_config(void __iomem *ioaddr) |
1248 | { | 1258 | { |
@@ -1279,6 +1289,22 @@ static void rtl8168c_hw_phy_config(void __iomem *ioaddr) | |||
1279 | rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init)); | 1289 | rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init)); |
1280 | } | 1290 | } |
1281 | 1291 | ||
1292 | static void rtl8168cx_hw_phy_config(void __iomem *ioaddr) | ||
1293 | { | ||
1294 | struct phy_reg phy_reg_init[] = { | ||
1295 | { 0x1f, 0x0000 }, | ||
1296 | { 0x12, 0x2300 }, | ||
1297 | { 0x1f, 0x0003 }, | ||
1298 | { 0x16, 0x0f0a }, | ||
1299 | { 0x1f, 0x0000 }, | ||
1300 | { 0x1f, 0x0002 }, | ||
1301 | { 0x0c, 0x7eb8 }, | ||
1302 | { 0x1f, 0x0000 } | ||
1303 | }; | ||
1304 | |||
1305 | rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init)); | ||
1306 | } | ||
1307 | |||
1282 | static void rtl_hw_phy_config(struct net_device *dev) | 1308 | static void rtl_hw_phy_config(struct net_device *dev) |
1283 | { | 1309 | { |
1284 | struct rtl8169_private *tp = netdev_priv(dev); | 1310 | struct rtl8169_private *tp = netdev_priv(dev); |
@@ -1296,12 +1322,20 @@ static void rtl_hw_phy_config(struct net_device *dev) | |||
1296 | case RTL_GIGA_MAC_VER_04: | 1322 | case RTL_GIGA_MAC_VER_04: |
1297 | rtl8169sb_hw_phy_config(ioaddr); | 1323 | rtl8169sb_hw_phy_config(ioaddr); |
1298 | break; | 1324 | break; |
1325 | case RTL_GIGA_MAC_VER_11: | ||
1326 | case RTL_GIGA_MAC_VER_12: | ||
1327 | case RTL_GIGA_MAC_VER_17: | ||
1328 | rtl8168b_hw_phy_config(ioaddr); | ||
1329 | break; | ||
1299 | case RTL_GIGA_MAC_VER_18: | 1330 | case RTL_GIGA_MAC_VER_18: |
1300 | rtl8168cp_hw_phy_config(ioaddr); | 1331 | rtl8168cp_hw_phy_config(ioaddr); |
1301 | break; | 1332 | break; |
1302 | case RTL_GIGA_MAC_VER_19: | 1333 | case RTL_GIGA_MAC_VER_19: |
1303 | rtl8168c_hw_phy_config(ioaddr); | 1334 | rtl8168c_hw_phy_config(ioaddr); |
1304 | break; | 1335 | break; |
1336 | case RTL_GIGA_MAC_VER_20: | ||
1337 | rtl8168cx_hw_phy_config(ioaddr); | ||
1338 | break; | ||
1305 | default: | 1339 | default: |
1306 | break; | 1340 | break; |
1307 | } | 1341 | } |