Skip to content

Commit

Permalink
r8169:Remove unnecessary phy reset for pcie nic when setting link spped.
Browse files Browse the repository at this point in the history
For pcie nic, after setting link speed and there is no link driver does not need
to do phy reset until link up.

For some pcie nics, to do this will also reset phy speed down counter and prevent
phy from auto speed down.

This patch fix the issue reported in following link.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1547151

Signed-off-by: Chunhao Lin <hau@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Chun-Hao Lin authored and David S. Miller committed Mar 14, 2016
1 parent 233fa44 commit c455697
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/realtek/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -1999,7 +1999,8 @@ static int rtl8169_set_speed(struct net_device *dev,
goto out;

if (netif_running(dev) && (autoneg == AUTONEG_ENABLE) &&
(advertising & ADVERTISED_1000baseT_Full)) {
(advertising & ADVERTISED_1000baseT_Full) &&
!pci_is_pcie(tp->pci_dev)) {
mod_timer(&tp->timer, jiffies + RTL8169_PHY_TIMEOUT);
}
out:
Expand Down

0 comments on commit c455697

Please sign in to comment.