Re: [PATCH net-next v3 5/7] net: phy: adin1100: Skip the soft reset on ADIN1110/ADIN2111
From: netdev-bot+sashiko
Date: Tue Nov 24 2026 - 07:03:39 EST
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 claims the whole-chip reset done by
CRSM_SFT_RST "is not an issue with the generic SPI protocol" because…
- [Low] The patch justifies dropping .soft_reset with "The MAC driver
already resets the chip before attaching the PHY".
--
net: phy: adin1100: Skip the soft reset on ADIN1110/ADIN2111
This commit removes .soft_reset from the ADIN1110 and ADIN2111 entries
in the adin1100 PHY driver. On these chips CRSM_SFT_RST resets the whole
MAC-PHY, not only the PHY. The change prepares for OPEN Alliance TC6
support, which configures the device before the PHY is attached.
> This is not an issue with the generic SPI protocol, where the adin1110
> driver configures the MAC in ndo_open, after phy_connect(). The OPEN
> Alliance TC6 protocol support, added in a following patch, configures
> the device in oa_tc6_init() before the PHY is attached, and the
> configuration would be lost.
[Severity: Low]
Is this accurate for the existing generic SPI driver? After ndo_open,
phylib can still call phy_init_hw() -> drv->soft_reset on at least two
paths.
The first path is system resume. adin1110 has no PM callbacks and does
not set phydev->mac_managed_pm, and adin_suspend is set. With WoL off
this gives:
mdio_bus_phy_suspend()
...
mdio_bus_phy_resume()
phy_init_hw()
adin_soft_reset()
On ADIN2111 this happens once for each PHY.
The second path is an SIOCSMIIREG write of BMCR_RESET while the
interface is up:
adin1110_ioctl() /* only when netif_running() */
phy_do_ioctl()
phy_mii_ioctl()
phy_init_hw()
adin_soft_reset()
On both paths the whole-chip reset would wipe the setup done in
adin1110_net_open():
ret = adin1110_write_reg(priv, ADIN1110_CONFIG2, ADIN1110_CRC_APPEND);
It would also wipe the IMASK1 interrupt enables and the MAC
address/filter slots. The interface would stay broken until it is
reopened.
If that's right, this patch also fixes a runtime problem for current
generic SPI users. Could the commit message describe that, and add a
Fixes: tag so the change can be considered for stable? .soft_reset has
been set for these PHY IDs since the IDs were added.
> diff --git a/drivers/net/phy/adin1100.c b/drivers/net/phy/adin1100.c
> index a69c3228961e9..bc7214b735057 100644
> --- a/drivers/net/phy/adin1100.c
> +++ b/drivers/net/phy/adin1100.c
> @@ -341,7 +341,6 @@ static struct phy_driver adin_driver[] = {
> PHY_ID_MATCH_EXACT(PHY_ID_ADIN1110),
> .name = "ADIN1110",
> .get_features = adin_get_features,
> - .soft_reset = adin_soft_reset,
> .probe = adin_probe,
> .config_aneg = adin_config_aneg,
> .read_status = adin_read_status,
> @@ -357,7 +356,6 @@ static struct phy_driver adin_driver[] = {
> PHY_ID_MATCH_EXACT(PHY_ID_ADIN2111),
> .name = "ADIN2111",
> .get_features = adin_get_features,
> - .soft_reset = adin_soft_reset,
> .probe = adin_probe,
> .config_aneg = adin_config_aneg,
> .read_status = adin_read_status,
[Severity: Low]
The commit message says "The MAC driver already resets the chip before
attaching the PHY". On the generic SPI path, does anything wait for that
reset to finish?
adin1110_probe() checks only the return value of the SPI write, then
registers the MDIO bus and connects the PHYs:
drivers/net/ethernet/adi/adin1110.c:adin1110_probe() {
...
ret = adin1110_write_reg(priv, ADIN1110_RESET, ADIN1110_SWRESET);
if (ret < 0)
return ret;
ret = adin1110_register_mdiobus(priv, dev);
...
return adin1110_probe_netdevs(priv);
}
There is no STATUS0 RESETC poll and no delay here. The 90 ms fsleep in
adin1110_check_spi() only runs with the optional reset GPIO, and it runs
before the SWRESET.
Before this patch, adin_soft_reset() polled ADIN_CRSM_STAT for
ADIN_CRSM_SYS_RDY, for up to 30 ms, before any PHY register write at
attach time. With .soft_reset now NULL, the attach path is:
adin1110_probe_netdevs()
phy_connect()
phy_attach_direct()
phy_init_hw()
adin_config_intr() /* read IRQ status, RMW IRQ mask */
phy_resume()
adin_resume() /* writes CRSM_SFT_PD_CNTRL */
The commit message itself says MDIO data is stale until the reset
completes. Could these writes race with the unconfirmed SWRESET and be
lost?
The impact today looks limited:
- phy_start() calls __phy_resume() again at ndo_open, so adin_resume()
runs a second time.
- The adin1110 mii_bus leaves irq[] at PHY_POLL, so the IRQ mask write
has no functional effect.
- Before this patch, the MDIO bus scan and the adin_get_features()
reads already ran right after the SWRESET without any wait.
Still, any PHY configuration added at attach time for these IDs could be
silently lost. Should adin1110_probe() wait for the reset to complete
before calling adin1110_register_mdiobus()?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261123115743.29523-1-iustin.stolniceanu%40analog.com