Re: [PATCH net v3 1/4] net: phy: as21xxx: handle stale link status during autoneg

From
netdev-bot+sashiko@kernel.org
Date
2026-10-30 10:32:01
Also in
lkml
Reply to
Christian Marangi, 2026-10-28
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The commit message for "net: phy: as21xxx: handle stale link
  status during autoneg" says "MDIO_STAT1_ANEGCOMPLETE may be cleared…

--

net: phy: as21xxx: handle stale link status during autoneg

The patch makes as21xxx_read_link() record whether autonegotiation has
completed. If autoneg is enabled but not yet complete, it forces
phydev->link down, so a stale link up bit cannot be reported with an
unknown speed.
When autonegotiation is restarted, MDIO_STAT1_ANEGCOMPLETE may be
cleared before MDIO_STAT1_LSTATUS. In this case, the link status bit
may still indicate link up even though autonegotiation has not
completed.
[Severity: Low]
This isn't a bug, but MDIO_STAT1_ANEGCOMPLETE doesn't seem to exist
anywhere in the tree.

The code in as21xxx_read_link() tests a different macro:

    phydev->autoneg_complete = !!(status & MDIO_AN_STAT1_COMPLETE);

That macro is defined in include/uapi/linux/mdio.h:

    #define MDIO_AN_STAT1_COMPLETE		BMSR_ANEGCOMPLETE

Could the commit message say MDIO_AN_STAT1_COMPLETE instead, so it matches
the code and the name can be found with grep?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261028073024.25175-1-ansuelsmth%40gmail.com
Thread (9 messages) 9 messages, 3 authors, last reply 13d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help