Skip to content

Commit

Permalink
r8169: remove duplicated RTL8169s PHY initialization steps
Browse files Browse the repository at this point in the history
Setting register 0x82 to value 01 is done a few lines before for all
chip versions <= 06 anyway. And setting PHY register 0x0b to value 00
is done at the end of rtl8169s_hw_phy_config() already. So we can
remove this.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Heiner Kallweit authored and David S. Miller committed Sep 20, 2018
1 parent 7a67e11 commit 806a81f
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions drivers/net/ethernet/realtek/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -4055,15 +4055,6 @@ static void rtl8169_init_phy(struct net_device *dev, struct rtl8169_private *tp)
RTL_W8(tp, 0x82, 0x01);
}

if (tp->mac_version == RTL_GIGA_MAC_VER_02) {
netif_dbg(tp, drv, dev,
"Set MAC Reg C+CR Offset 0x82h = 0x01h\n");
RTL_W8(tp, 0x82, 0x01);
netif_dbg(tp, drv, dev,
"Set PHY Reg 0x0bh = 0x00h\n");
rtl_writephy(tp, 0x0b, 0x0000); //w 0x0b 15 0 0
}

/* We may have called phy_speed_down before */
phy_speed_up(dev->phydev);

Expand Down

0 comments on commit 806a81f

Please sign in to comment.