Re: [PATCH net-next v5 13/13] ax88796b: Add support for AX88772D, AX88179A and AX88279
From: Andrew Lunn
Date: Thu Aug 06 2026 - 17:17:33 EST
> > > +static int asix_ax88279_config_aneg(struct phy_device *phydev)
> > > +{
> > > + bool adv_2500;
> > > + int ret;
> > > +
> > > + if (phydev->autoneg == AUTONEG_DISABLE) {
> > > + phydev_warn(phydev, "Disabling autoneg is not supported\n");
> > > + return -EINVAL;
> > > + }
> >
> > Why is that? Now that phylink is driving the PHY, and reporting
> > speeds, duplex etc, you should have everything you need to program the
> > MAC when the link mode is forced.
> >
> I tried forcing the PHY speed in the past, and it does not work.
> This is a limitation which is also acknowledged for the suspected underlying PHY
> hardware Airoha EN8811H, see the head of air_en8811h.c
How well does this unwind on error? Is phydev->autoneg put back to the
old state to indicate autoneg is used?
This is one of the areas where phylib/phylink is missing a bit of
support infrastructure. We have a bit indicating the PHY support
autoneg, ETHTOOL_LINK_MODE_Autoneg_BIT, but there is no bit
ETHTOOL_LINK_MODE_Force_BIT, indicating the PHY supports forced
mode. So the core cannot enforce this and reject it in
ksettings_set().
Andrew