Skip to content

Commit

Permalink
r8169: always autoneg on resume
Browse files Browse the repository at this point in the history
This affects at least versions 25 and 33, so assume all cards are broken
and just renegotiate by default.

Fixes: 10bc6a6 ("r8169: fix autoneg issue on resume with RTL8168E")
Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alex Xu (Hello71) authored and David S. Miller committed Oct 3, 2018
1 parent 64199fc commit 9003b36
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/net/ethernet/realtek/r8169.c
Original file line number Diff line number Diff line change
@@ -4072,13 +4072,12 @@ static void rtl8169_init_phy(struct net_device *dev, struct rtl8169_private *tp)

genphy_soft_reset(dev->phydev);

/* It was reported that chip version 33 ends up with 10MBit/Half on a
/* It was reported that several chips end 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.
* these chips 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)
if (dev->phydev->autoneg == AUTONEG_ENABLE)
phy_restart_aneg(dev->phydev);
}

0 comments on commit 9003b36

Please sign in to comment.