Re: [PATCH net-next v2] net: phy: aquantia: Poll global status register for provision ID

From: Andrew Lunn

Date: Sun Nov 15 2026 - 10:45:30 EST


> > + if (val < 0)
> > + phydev_warn(phydev, "Failed to read VEND1_GLOBAL_RSVD_STAT1: %pe\n",
> > + ERR_PTR(val));
> > + else if (ret)
> > + phydev_warn(phydev, "Firmware provisioning ID not ready; "
> > + "interface mode detection may be incorrect\n");
>
> [Severity: Medium]
> If phy_read_mmd() fails while polling VEND1_GLOBAL_RSVD_STAT1, the
> val < 0 term ends read_poll_timeout() right away with ret == 0. The
> code then logs a warning and returns 0, so the MDIO error is lost.

This is one of the earliest reads from the device. If the MDIO bus is
going to fail, it will fail here, rather than later. So the error
handling should be correct. Please address this issue.

Andrew