From: netdev-bot+sashiko@kernel.org
To: iustin.stolniceanu@analog.com
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
kuba@kernel.org, pabeni@redhat.com, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
parthiban.veerasooran@microchip.com, hkallweit1@gmail.com,
linux@armlinux.org.uk, marcelo.schmitt@analog.com,
alvin.sipraga@analog.com, ciprian.regus@analog.com,
Selvamani.Rajagopal@onsemi.com, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 5/7] net: phy: adin1100: Skip the soft reset on ADIN1110/ADIN2111
Date: Tue, 24 Nov 2026 12:02:48 +0000 [thread overview]
Message-ID: <179552176854.3135.14043257413847529020@kernel.org> (raw)
In-Reply-To: <20261123115743.29523-6-iustin.stolniceanu@analog.com>
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
next prev parent reply other threads:[~2026-11-24 12:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 11:57 [PATCH net-next v3 0/7] net: ethernet: adi: adin1110: Add OPEN Alliance TC6 support Iustin Stolniceanu
2026-11-23 11:57 ` [PATCH net-next v3 1/7] net: ethernet: oa_tc6: Forward declare struct mii_bus Iustin Stolniceanu
2026-11-23 11:57 ` [PATCH net-next v3 2/7] net: ethernet: oa_tc6: Allow custom reset settle time values Iustin Stolniceanu
2026-11-23 11:57 ` [PATCH net-next v3 3/7] net: ethernet: oa_tc6: Add support for MDIO indirect access Iustin Stolniceanu
2026-11-24 12:02 ` netdev-bot+sashiko
2026-11-23 11:57 ` [PATCH net-next v3 4/7] net: phy: adin1100: Add separate driver entries for ADIN1110/ADIN2111 Iustin Stolniceanu
2026-11-23 11:57 ` [PATCH net-next v3 5/7] net: phy: adin1100: Skip the soft reset on ADIN1110/ADIN2111 Iustin Stolniceanu
2026-11-24 12:02 ` netdev-bot+sashiko [this message]
2026-11-23 11:57 ` [PATCH net-next v3 6/7] dt-bindings: net: adi,adin1110: Add adi,spi-oa-tc6 Iustin Stolniceanu
2026-11-23 11:57 ` [PATCH net-next v3 7/7] net: ethernet: adi: adin1110: Add OA TC6 protocol support for ADIN1110 Iustin Stolniceanu
2026-11-24 12:02 ` netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179552176854.3135.14043257413847529020@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=Selvamani.Rajagopal@onsemi.com \
--cc=alvin.sipraga@analog.com \
--cc=andrew+netdev@lunn.ch \
--cc=ciprian.regus@analog.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=iustin.stolniceanu@analog.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=marcelo.schmitt@analog.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=parthiban.veerasooran@microchip.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox