On Mon, Nov 30, 2026 at 02:55:12AM +0200, Cristian Ciocaltea wrote:
> The speed status register reports 0x40 for a 10M link, not 0x0 as > VEND1_SPEED_10 describes. > > Attempting to force a 10M link would therefore match no case of the > switch in aeon_read_status() and make it fail with -EINVAL, generating > the following splat: > > [ 740.903011] _phy_start_aneg+0x0/0x98: returned: -22 > [ 740.907932] WARNING: CPU: 0 PID: 6774 at _phy_state_machine+0x60/0x2dc > [...] > [ 741.192990] Call trace: > [ 741.195429] _phy_state_machine+0x60/0x2dc > [ 741.199526] phy_state_machine+0x28/0x80 > [ 741.203449] process_one_work+0x174/0x300 > [...] > > The bug was hidden because the status was masked with VEND1_SPEED_STATUS > (the register address) instead of VEND1_SPEED_MASK. 0x40 & 0x4002 > evaluates to 0, which happened to match the wrong VEND1_SPEED_10 value, > so 10M links were still reported correctly. Fixing the mask exposes the > bad definition. > > Describe the value the PHY actually reports. > > Fixes: 830877d89edc ("net: phy: Add support for Aeonsemi AS21xxx PHYs") > Signed-off-by: Cristian Ciocaltea <cris…@collabora.com>
Reviewed-by: Andrew Lunn <andr…@lunn.ch> Andrew