Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753846Ab1BVGof (ORCPT ); Tue, 22 Feb 2011 01:44:35 -0500 Received: from rtits2.realtek.com ([60.250.210.242]:51552 "EHLO rtits2.realtek.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753513Ab1BVGoO (ORCPT ); Tue, 22 Feb 2011 01:44:14 -0500 From: Hayes Wang To: CC: , , Hayes Wang Subject: [PATCH 5/5] r8169: adjust rtl8169_set_speed_xmii function Date: Tue, 22 Feb 2011 14:41:57 +0800 X-BOX-Message-Id: p1M6i42A013284 Message-ID: <1298356917-486-5-git-send-email-hayeswang@realtek.com> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <1298356917-486-1-git-send-email-hayeswang@realtek.com> References: <1298356917-486-1-git-send-email-hayeswang@realtek.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1700 Lines: 57 Adjust code of rtl8169_set_speed_xmii function and remove part codes which have done in rtl_pll_power_up function. Signed-off-by: Hayes Wang --- 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 9e7e3b3..8c85545 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1137,6 +1137,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; @@ -1167,18 +1169,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 { @@ -1193,8 +1183,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; -- 1.7.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/