Skip to content

Commit

Permalink
r8169: fix wrong PHY ID issue with RTL8168dp
Browse files Browse the repository at this point in the history
[ Upstream commit 62bdc8f ]

As reported in [0] at least one RTL8168dp version has problems
establishing a link. This chip version has an integrated RTL8211b PHY,
however the chip seems to report a wrong PHY ID, resulting in a wrong
PHY driver (for Generic Realtek PHY) being loaded.
Work around this issue by adding a hook to r8168dp_2_mdio_read()
for returning the correct PHY ID.

[0] https://bbs.archlinux.org/viewtopic.php?id=246508

Fixes: 242cd9b ("r8169: use phy_resume/phy_suspend")
Signed-off-by: Heiner Kallweit <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
hkallweit authored and gregkh committed Nov 10, 2019
1 parent 9e7c4fa commit 5eb1967
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/realtek/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,10 @@ static int r8168dp_2_mdio_read(struct rtl8169_private *tp, int reg)
{
int value;

/* Work around issue with chip reporting wrong PHY ID */
if (reg == MII_PHYSID2)
return 0xc912;

r8168dp_2_mdio_start(tp);

value = r8169_mdio_read(tp, reg);
Expand Down

0 comments on commit 5eb1967

Please sign in to comment.