aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/r8169.c
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2008-05-30 10:07:07 -0400
committerFrancois Romieu <romieu@fr.zoreil.com>2008-10-10 17:08:22 -0400
commitf50d4275422415cfb2a5b94bad3b2b229d0ec1aa (patch)
treef1a7ced221a135f43fa3b173a5f6b4cda12fbbec /drivers/net/r8169.c
parenta2de6b89b74b28052e293fdb39975a5a03c432e0 (diff)
r8169: update phy init parameters
The modified parameters are synced with Realtek's driver version 8.006.00. The change should only be noticeable with some 8168c. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Edward Hsu <edward_hsu@realtek.com.tw>
Diffstat (limited to 'drivers/net/r8169.c')
-rw-r--r--drivers/net/r8169.c29
1 files changed, 24 insertions, 5 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 9881563898d7..62e111591567 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1379,26 +1379,45 @@ static void rtl8168c_hw_phy_config(void __iomem *ioaddr)
1379 { 0x1f, 0x0003 }, 1379 { 0x1f, 0x0003 },
1380 { 0x12, 0xc096 }, 1380 { 0x12, 0xc096 },
1381 { 0x16, 0x000a }, 1381 { 0x16, 0x000a },
1382 { 0x1f, 0x0000 } 1382 { 0x1f, 0x0000 },
1383 { 0x1f, 0x0000 },
1384 { 0x09, 0x2000 },
1385 { 0x09, 0x0000 }
1383 }; 1386 };
1384 1387
1385 rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init)); 1388 rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init));
1389
1390 mdio_patch(ioaddr, 0x14, 1 << 5);
1391 mdio_patch(ioaddr, 0x0d, 1 << 5);
1392 mdio_write(ioaddr, 0x1f, 0x0000);
1386} 1393}
1387 1394
1388static void rtl8168cx_hw_phy_config(void __iomem *ioaddr) 1395static void rtl8168cx_hw_phy_config(void __iomem *ioaddr)
1389{ 1396{
1390 struct phy_reg phy_reg_init[] = { 1397 struct phy_reg phy_reg_init[] = {
1391 { 0x1f, 0x0000 }, 1398 { 0x1f, 0x0001 },
1392 { 0x12, 0x2300 }, 1399 { 0x12, 0x2300 },
1393 { 0x1f, 0x0003 }, 1400 { 0x03, 0x802f },
1394 { 0x16, 0x0f0a }, 1401 { 0x02, 0x4f02 },
1395 { 0x1f, 0x0000 }, 1402 { 0x01, 0x0409 },
1403 { 0x00, 0xf099 },
1404 { 0x04, 0x9800 },
1405 { 0x04, 0x9000 },
1406 { 0x1d, 0x3d98 },
1396 { 0x1f, 0x0002 }, 1407 { 0x1f, 0x0002 },
1397 { 0x0c, 0x7eb8 }, 1408 { 0x0c, 0x7eb8 },
1409 { 0x06, 0x0761 },
1410 { 0x1f, 0x0003 },
1411 { 0x16, 0x0f0a },
1398 { 0x1f, 0x0000 } 1412 { 0x1f, 0x0000 }
1399 }; 1413 };
1400 1414
1401 rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init)); 1415 rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init));
1416
1417 mdio_patch(ioaddr, 0x16, 1 << 0);
1418 mdio_patch(ioaddr, 0x14, 1 << 5);
1419 mdio_patch(ioaddr, 0x0d, 1 << 5);
1420 mdio_write(ioaddr, 0x1f, 0x0000);
1402} 1421}
1403 1422
1404static void rtl8102e_hw_phy_config(void __iomem *ioaddr) 1423static void rtl8102e_hw_phy_config(void __iomem *ioaddr)