X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fnet%2Fr8169.c;h=e8960f294a6e04d8cfe5ed0b2cc5469bf4ebd918;hb=7da97ec96a0934319c7fbedd3d38baf533e20640;hp=3680ee7ccb0dd8157dcab8c9608878d1b7844748;hpb=a441d7b6bf3386c5b384685151a1cea921658819;p=linux-2.6-omap-h63xx.git diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 3680ee7ccb0..e8960f294a6 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1243,6 +1243,16 @@ static void rtl8169sb_hw_phy_config(void __iomem *ioaddr) rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init)); } +static void rtl8168b_hw_phy_config(void __iomem *ioaddr) +{ + struct phy_reg phy_reg_init[] = { + { 0x1f, 0x0000 }, + { 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) { @@ -1260,6 +1270,8 @@ static void rtl8168cp_hw_phy_config(void __iomem *ioaddr) static void rtl8168c_hw_phy_config(void __iomem *ioaddr) { struct phy_reg phy_reg_init[] = { + { 0x1f, 0x0001 }, + { 0x12, 0x2300 }, { 0x1f, 0x0002 }, { 0x00, 0x88d4 }, { 0x01, 0x82b1 }, @@ -1277,6 +1289,22 @@ static void rtl8168c_hw_phy_config(void __iomem *ioaddr) rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init)); } +static void rtl8168cx_hw_phy_config(void __iomem *ioaddr) +{ + struct phy_reg phy_reg_init[] = { + { 0x1f, 0x0000 }, + { 0x12, 0x2300 }, + { 0x1f, 0x0003 }, + { 0x16, 0x0f0a }, + { 0x1f, 0x0000 }, + { 0x1f, 0x0002 }, + { 0x0c, 0x7eb8 }, + { 0x1f, 0x0000 } + }; + + rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init)); +} + static void rtl_hw_phy_config(struct net_device *dev) { struct rtl8169_private *tp = netdev_priv(dev); @@ -1294,12 +1322,20 @@ static void rtl_hw_phy_config(struct net_device *dev) case RTL_GIGA_MAC_VER_04: rtl8169sb_hw_phy_config(ioaddr); break; + case RTL_GIGA_MAC_VER_11: + case RTL_GIGA_MAC_VER_12: + case RTL_GIGA_MAC_VER_17: + rtl8168b_hw_phy_config(ioaddr); + break; case RTL_GIGA_MAC_VER_18: rtl8168cp_hw_phy_config(ioaddr); break; case RTL_GIGA_MAC_VER_19: rtl8168c_hw_phy_config(ioaddr); break; + case RTL_GIGA_MAC_VER_20: + rtl8168cx_hw_phy_config(ioaddr); + break; default: break; }