diff options
author | Hayes Wang <hayeswang@realtek.com> | 2011-02-22 12:26:18 +0300 |
---|---|---|
committer | Francois Romieu <romieu@fr.zoreil.com> | 2011-03-01 19:52:41 +0300 |
commit | 716b50a31fb237c480e67ad66dc23feb35d40772 (patch) | |
tree | 9599e03d0c2cd94a9c121a17880af061726af28f /drivers/net/r8169.c | |
parent | 8da83f8e73a42fa3142843938aa1590b82acb6ec (diff) | |
download | linux-716b50a31fb237c480e67ad66dc23feb35d40772.tar.xz |
r8169: adjust rtl8169_set_speed_xmii function.
- adjust code of rtl8169_set_speed_xmii function
- remove parts of code which are done in rtl_pll_power_up
function (8168 only)
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Diffstat (limited to 'drivers/net/r8169.c')
-rw-r--r-- | drivers/net/r8169.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 469ab0b7ce31..de94489cf96e 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1124,6 +1124,8 @@ static int rtl8169_set_speed_xmii(struct net_device *dev, struct rtl8169_private *tp = netdev_priv(dev); int giga_ctrl, bmcr; + rtl_writephy(tp, 0x1f, 0x0000); + if (autoneg == AUTONEG_ENABLE) { int auto_nego; @@ -1152,18 +1154,6 @@ static int rtl8169_set_speed_xmii(struct net_device *dev, bmcr = BMCR_ANENABLE | BMCR_ANRESTART; - if ((tp->mac_version == RTL_GIGA_MAC_VER_11) || - (tp->mac_version == RTL_GIGA_MAC_VER_12) || - (tp->mac_version >= RTL_GIGA_MAC_VER_17)) { - /* - * Wake up the PHY. - * Vendor specific (0x1f) and reserved (0x0e) MII - * registers. - */ - rtl_writephy(tp, 0x1f, 0x0000); - rtl_writephy(tp, 0x0e, 0x0000); - } - rtl_writephy(tp, MII_ADVERTISE, auto_nego); rtl_writephy(tp, MII_CTRL1000, giga_ctrl); } else { @@ -1178,8 +1168,6 @@ static int rtl8169_set_speed_xmii(struct net_device *dev, if (duplex == DUPLEX_FULL) bmcr |= BMCR_FULLDPLX; - - rtl_writephy(tp, 0x1f, 0x0000); } tp->phy_1000_ctrl_reg = giga_ctrl; |