Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10bc6a60 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller
Browse files

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: a2965f12 ("r8169: remove rtl8169_set_speed_xmii")
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Reported-by: default avatarNeil MacLeod <neil@nmacleod.com>
Tested-by: default avatarNeil MacLeod <neil@nmacleod.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d7ab5cdc
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -4071,6 +4071,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)