Skip to contentSkip to conversation

r8169: fix autoneg issue on resume with RTL8168E

PATCH Applied Heiner Kallweit 2 participants 2 messages Sep 21, 2018

Subsystems (3)
lore
Share & tools
lore

Heiner Kallweit

author maintainer
#0 lore raw

PATCH 1/1 r8169: fix autoneg issue on resume with RTL8168E

It was reported that chip version 33 (RTL8168E) ends up with 10MBit/Half on a 1GBit link after resuming from S3 (with different link partners). For whatever reason the PHY on this chip doesn't properly start a renegotiation when soft-reset. Explicitly requesting a renegotiation fixes this.

Fixes a2965f12fde6 ("r8169: remove rtl8169_set_speed_xmii")
---
 drivers/net/ethernet/realtek/r8169.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/net/ethernet/realtek/r8169.c +9 -0
index 1d8631303..7f4647c58 100644
@@ -4069,6 +4069,15 @@ static void rtl8169_init_phy(struct net_device *dev, struct rtl8169_private *tp)
 	phy_speed_up(dev->phydev);
 
 	genphy_soft_reset(dev->phydev);
+
+	/* It was reported that chip version 33 ends up with 10MBit/Half on a
+	 * 1GBit link after resuming from S3. For whatever reason the PHY on
+	 * this chip doesn't properly start a renegotiation when soft-reset.
+	 * Explicitly requesting a renegotiation fixes this.
+	 */
+	if (tp->mac_version == RTL_GIGA_MAC_VER_33 &&
+	    dev->phydev->autoneg == AUTONEG_ENABLE)
+		phy_restart_aneg(dev->phydev);
 }
 
 static void rtl_rar_set(struct rtl8169_private *tp, u8 *addr)
Signature · 1 line
2.19.0
maintainer Applied
#1 lore raw

From: Heiner Kallweit <[email protected]>
Date: Thu, 20 Sep 2018 22:47:09 +0200

Quoted 10 lines

It was reported that chip version 33 (RTL8168E) ends up with 10MBit/Half on a 1GBit link after resuming from S3 (with different link partners). For whatever reason the PHY on this chip doesn't properly start a renegotiation when soft-reset. Explicitly requesting a renegotiation fixes this.

Fixes a2965f12fde6 ("r8169: remove rtl8169_set_speed_xmii")

Applied, thank you.

Please always make "Fixes: " the first tag in a set of tags.

I fixed it up for you this time.

Thanks.