mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 18:19:02 +00:00
69906789e0
Follow the advise of Russell King allows to greatly improve the driver for RealTek's 1G and 2.5G Ethernet PHYs. The results are full/half duplex as well as Gbit master/slave property being read from PHY Specific Status Register (PHYSR), and fixes regarding link-partner advertisement. Fixes: #14504 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
29 lines
981 B
Diff
29 lines
981 B
Diff
From 8b137d1e405dc90300ba577db44c70f0e026636e Mon Sep 17 00:00:00 2001
|
|
From: Daniel Golle <daniel@makrotopia.org>
|
|
Date: Tue, 8 Oct 2024 21:09:19 +0100
|
|
Subject: [PATCH 3/3] net: phy: realtek: clear 1000Base-T link partner
|
|
advertisement
|
|
|
|
Clear 1000Base-T link partner advertisement bits in Clause-45
|
|
read_status() function in case auto-negotiation is disabled or has not
|
|
been completed.
|
|
|
|
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
---
|
|
drivers/net/phy/realtek.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
--- a/drivers/net/phy/realtek.c
|
|
+++ b/drivers/net/phy/realtek.c
|
|
@@ -1056,6 +1056,10 @@ static int rtl822x_c45_read_status(struc
|
|
if (ret < 0)
|
|
return ret;
|
|
|
|
+ if (phydev->autoneg == AUTONEG_DISABLE ||
|
|
+ !genphy_c45_aneg_done(phydev))
|
|
+ mii_stat1000_mod_linkmode_lpa_t(phydev->lp_advertising, 0);
|
|
+
|
|
/* Vendor register as C45 has no standardized support for 1000BaseT */
|
|
if (phydev->autoneg == AUTONEG_ENABLE) {
|
|
val = phy_read_mmd(phydev, MDIO_MMD_VEND2,
|