From: Andrew Lunn <andrew@lunn.ch>
To: "Alvin Šipraga" <alvin.sipraga@analog.com>
Cc: Iustin Stolniceanu <iustin.stolniceanu@analog.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Parthiban Veerasooran <parthiban.veerasooran@microchip.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Marcelo Schmitt <marcelo.schmitt@analog.com>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Ciprian Regus <ciprian.regus@analog.com>
Subject: Re: [PATCH net-next 5/5] net: phy: adin1100: Skip the soft reset on ADIN1110/ADIN2111
Date: Wed, 4 Nov 2026 22:16:03 +0100 [thread overview]
Message-ID: <309a1eb9-8255-42f0-a510-b40bf3302bbd@lunn.ch> (raw)
In-Reply-To: <autAidTgykOObtzp@analog.com>
> > @@ -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?
Humm...
#define PHY_ID_ADIN1100 0x0283bc81
#define PHY_ID_ADIN1110 0x0283bc91
#define PHY_ID_ADIN2111 0x0283bca1
static struct phy_driver adin_driver[] = {
{
.phy_id = PHY_ID_ADIN1100,
.phy_id_mask = 0xffffffcf,
.name = "ADIN1100",
That phy_id_mask is funky.
static const struct mdio_device_id __maybe_unused adin_tbl[] = {
{ PHY_ID_MATCH_MODEL(PHY_ID_ADIN1100) },
{ PHY_ID_MATCH_MODEL(PHY_ID_ADIN1110) },
{ PHY_ID_MATCH_MODEL(PHY_ID_ADIN2111) },
{ }
And this contradicts it.
Please leaf through the datasheet for these devices and check how the
ID is defined. Often the lowest nibble is the revision, so 0x0283bc81
and 0x0283bc8f would be the same device, just different bugs.
However, they can be different devices. This is why we have:
#define PHY_ID_MATCH_EXACT(id) .phy_id = (id), .phy_id_mask = PHY_ID_MATCH_EXTACT_MASK
#define PHY_ID_MATCH_MODEL(id) .phy_id = (id), .phy_id_mask = PHY_ID_MATCH_MODEL_MASK
#define PHY_ID_MATCH_VENDOR(id) .phy_id = (id), .phy_id_mask = PHY_ID_MATCH_VENDOR_MASK
Since they are different devices, it would be good to have multiple
struct phy_driver, if that can be done without breaking backwards
compatibility.
Andrew
next prev parent reply other threads:[~2026-11-04 21:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 16:09 [PATCH net-next 0/5] net: ethernet: adi: adin1110: Add OPEN Alliance TC6 support Iustin Stolniceanu
2026-11-03 16:09 ` [PATCH net-next 1/5] net: ethernet: oa_tc6: Allow custom reset settle time values Iustin Stolniceanu
2026-11-04 14:10 ` Alvin Šipraga
2026-11-03 16:09 ` [PATCH net-next 2/5] net: ethernet: oa_tc6: Add support for MDIO indirect access Iustin Stolniceanu
2026-11-04 14:08 ` Alvin Šipraga
2026-11-03 16:09 ` [PATCH net-next 3/5] dt-bindings: net: adi,adin1110: Add adi,spi-oa-tc6 Iustin Stolniceanu
2026-11-04 14:12 ` Alvin Šipraga
2026-11-03 16:09 ` [PATCH net-next 4/5] net: ethernet: adi: adin1110: Add OA TC6 protocol support for ADIN1110 Iustin Stolniceanu
2026-11-04 14:26 ` Alvin Šipraga
2026-11-04 21:06 ` Andrew Lunn
2026-11-03 16:09 ` [PATCH net-next 5/5] net: phy: adin1100: Skip the soft reset on ADIN1110/ADIN2111 Iustin Stolniceanu
2026-11-04 14:29 ` Alvin Šipraga
2026-11-04 21:16 ` Andrew Lunn [this message]
2026-11-03 20:49 ` [PATCH net-next 0/5] net: ethernet: adi: adin1110: Add OPEN Alliance TC6 support Andrew Lunn
2026-11-04 8:06 ` Stolniceanu, Iustin
2026-11-04 14:59 ` Andrew Lunn
2026-11-04 15:14 ` Stolniceanu, Iustin
2026-11-03 20:54 ` Andrew Lunn
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=309a1eb9-8255-42f0-a510-b40bf3302bbd@lunn.ch \
--to=andrew@lunn.ch \
--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
all inboxes | Powered by JetHome®