Skip to contentSkip to conversation

r8169:Remove unnecessary phy reset for pcie nic when setting link spped.

PATCH Applied Chunhao Lin 2 participants 2 messages Mar 11, 2016 – Mar 14, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 r8169:Remove unnecessary phy reset for pcie nic when setting link spped.

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

---
 drivers/net/ethernet/realtek/r8169.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/realtek/r8169.c +2 -1
index dd2cf37..94f08f1 100644
@@ -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:
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw

From: Chunhao Lin <[email protected]>
Date: Fri, 11 Mar 2016 14:21:14 +0800

Quoted 10 lines

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

Applied, thanks.