Re: [PATCH net-next 5/5] net: phy: adin1100: Skip the soft reset on ADIN1110/ADIN2111

From: Alvin Šipraga

Date: Wed Nov 04 2026 - 09:35:16 EST


On Tue, Nov 03, 2026 at 06:09:18PM +0200, Iustin Stolniceanu wrote:
> The ADIN1110 and ADIN2111 MAC-PHYs integrate the ADIN1100 PHY and use
> this driver. On these devices, CRSM_SFT_RST resets the whole chip, not
> only the PHY, undoing the configuration done by the MAC driver before
> the PHY is attached. MDIO reads also return stale data until the reset
> completes.
>
> The MAC driver already resets the chip before attaching the PHY, so
> skip the soft reset on these devices.

Is this a bugfix?

>
> Signed-off-by: Iustin Stolniceanu <iustin.stolniceanu@xxxxxxxxxx>
> ---
> drivers/net/phy/adin1100.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/net/phy/adin1100.c b/drivers/net/phy/adin1100.c
> index 8f9753d4318c..7b4e68285a9d 100644
> --- a/drivers/net/phy/adin1100.c
> +++ b/drivers/net/phy/adin1100.c
> @@ -232,6 +232,15 @@ static int adin_soft_reset(struct phy_device *phydev)
> {
> int ret;
>
> + /* On the ADIN1110/ADIN2111 MAC-PHYs, CRSM_SFT_RST resets the whole
> + * chip, undoing the MAC driver's setup, and MDIO reads return stale
> + * data until it completes. The MAC driver has already reset the
> + * chip, so skip it here.
> + */
> + if (phy_id_compare_model(phydev->phy_id, PHY_ID_ADIN1110) ||
> + phy_id_compare_model(phydev->phy_id, PHY_ID_ADIN2111))
> + return 0;

It seems more common to have a separate struct phy_driver entry in the
array passed to module_phy_driver() with a more precise
phy_id/mask. Then for ADIN1110/ADIN2111 you'd omit the
.soft_reset. Maybe Andrew knows what is preferred here?

> +
> ret = phy_set_bits_mmd(phydev, MDIO_MMD_VEND1, ADIN_CRSM_SFT_RST, ADIN_CRSM_SFT_RST_EN);
> if (ret < 0)
> return ret;
> --
> 2.43.0
>