[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <96c446f0-3134-4e91-871b-3a9b4c02738a@lunn.ch>
Date: Fri, 10 Jan 2025 17:50:20 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Xiangqian Zhang <zhangxiangqian@...inos.cn>
Cc: Frank.Sae@...or-comm.com, hkallweit1@...il.com, linux@...linux.org.uk,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: phy: motorcomm: Fix yt8521 Speed issue
On Fri, Jan 10, 2025 at 05:33:58PM +0800, Xiangqian Zhang wrote:
> yt8521 is 1000Mb/s after connecting to the network cable, but it is
> still 1000Mb/s after unplugging the network cable.
If you look at genphy_read_status() it does:
phydev->master_slave_get = MASTER_SLAVE_CFG_UNSUPPORTED;
phydev->master_slave_state = MASTER_SLAVE_STATE_UNSUPPORTED;
phydev->speed = SPEED_UNKNOWN;
phydev->duplex = DUPLEX_UNKNOWN;
phydev->pause = 0;
phydev->asym_pause = 0;
and then reads the status from the hardware and sets all these. You
might want to make yt8521_read_status() more like
genphy_read_status().
Andrew
Powered by blists - more mailing lists