diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2008-05-30 16:11:48 +0200 |
---|---|---|
committer | Francois Romieu <romieu@fr.zoreil.com> | 2008-10-10 23:08:25 +0200 |
commit | 236b8082aa239e91c3cd9cb466d0527a735e54db (patch) | |
tree | c2ecaeea9942f7bdf8c59cff50962cce1caf0dcd /drivers | |
parent | f50d4275422415cfb2a5b94bad3b2b229d0ec1aa (diff) | |
download | op-kernel-dev-236b8082aa239e91c3cd9cb466d0527a735e54db.zip op-kernel-dev-236b8082aa239e91c3cd9cb466d0527a735e54db.tar.gz |
r8169: new phy init parameters for the 8168b
The new parameters are synced with Realtek's driver
version 8.006.00.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/r8169.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 62e1115..8086bac 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1350,6 +1350,30 @@ static void rtl8169sb_hw_phy_config(void __iomem *ioaddr) rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init)); } +static void rtl8168bb_hw_phy_config(void __iomem *ioaddr) +{ + struct phy_reg phy_reg_init[] = { + { 0x10, 0xf41b }, + { 0x1f, 0x0000 } + }; + + mdio_write(ioaddr, 0x1f, 0x0001); + mdio_patch(ioaddr, 0x16, 1 << 0); + + rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init)); +} + +static void rtl8168bef_hw_phy_config(void __iomem *ioaddr) +{ + struct phy_reg phy_reg_init[] = { + { 0x1f, 0x0001 }, + { 0x10, 0xf41b }, + { 0x1f, 0x0000 } + }; + + rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init)); +} + static void rtl8168cp_hw_phy_config(void __iomem *ioaddr) { struct phy_reg phy_reg_init[] = { @@ -1458,6 +1482,15 @@ static void rtl_hw_phy_config(struct net_device *dev) case RTL_GIGA_MAC_VER_09: rtl8102e_hw_phy_config(ioaddr); break; + case RTL_GIGA_MAC_VER_11: + rtl8168bb_hw_phy_config(ioaddr); + break; + case RTL_GIGA_MAC_VER_12: + rtl8168bef_hw_phy_config(ioaddr); + break; + case RTL_GIGA_MAC_VER_17: + rtl8168bef_hw_phy_config(ioaddr); + break; case RTL_GIGA_MAC_VER_18: rtl8168cp_hw_phy_config(ioaddr); break; |