Re: [PATCH] net: phy: motorcomm: Fix yt8521 Speed issue

From: Frank.Sae
Date: Mon Jan 20 2025 - 22:36:02 EST


On 1/10/25 01:33, Xiangqian Zhang wrote:
yt8521 is 1000Mb/s after connecting to the network cable, but it is
still 1000Mb/s after unplugging the network cable.

Signed-off-by: Xiangqian Zhang <zhangxiangqian@xxxxxxxxxx>
---
drivers/net/phy/motorcomm.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/phy/motorcomm.c b/drivers/net/phy/motorcomm.c
index 0e91f5d1a4fd..e1e33b1236e2 100644
--- a/drivers/net/phy/motorcomm.c
+++ b/drivers/net/phy/motorcomm.c
@@ -1487,6 +1487,7 @@ static int yt8521_read_status(struct phy_device *phydev)
}
phydev->link = 0;
+ phydev->speed = SPEED_UNKNOWN;
}
return 0;


Dear xiangqian,

you could find the initialization of phydev->speed = SPEED_UNKNOWN;

in yt8521_read_status_paged().

Regards

Frank