From: Francois Romieu <romieu@fr.zoreil.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Hayes Wang <hayeswang@realtek.com>
Subject: [PATCH net-next 1/4] r8169: adjust rtl8169_set_speed_xmii function.
Date: Sat, 5 Mar 2011 10:39:18 +0100 [thread overview]
Message-ID: <20110305093918.GA13854@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <20110305093716.GA13835@electric-eye.fr.zoreil.com>
- 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>
---
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 469ab0b..de94489 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;
--
1.7.4
next prev parent reply other threads:[~2011-03-05 9:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-05 9:37 [PATCH net-next 0/4] r8169 driver updates Francois Romieu
2011-03-05 9:39 ` Francois Romieu [this message]
2011-03-05 9:39 ` [PATCH net-next 2/4] r8169: support the new chips for RTL8105E Francois Romieu
2011-03-05 9:40 ` [PATCH net-next 3/4] r8169: support control of advertising Francois Romieu
2011-03-05 9:41 ` [PATCH net-next 4/4] r8169: convert to new VLAN model Francois Romieu
2011-03-07 23:40 ` [PATCH net-next 0/4] r8169 driver updates David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110305093918.GA13854@electric-eye.fr.zoreil.com \
--to=romieu@fr.zoreil.com \
--cc=davem@davemloft.net \
--cc=hayeswang@realtek.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox