Re: [PATCH net-next 4/5] net: ethernet: adi: adin1110: Add OA TC6 protocol support for ADIN1110
From: Alvin Šipraga
Date: Fri Nov 06 2026 - 07:20:22 EST
On Fri, Nov 06, 2026 at 11:43:07AM +0000, Stolniceanu, Iustin wrote:
> On Wed, Nov 04, 2026 at 03:26:07PM +0100, Alvin Šipraga wrote:
> > For the above, it wasn't quite clear to me why you don't call
> > adin1110_port_set_forwarding_state()?
>
> It does the same as the generic adin1110_net_open(), which also only
> sets the port state and the MAC address. The extra step in
> adin1110_port_set_forwarding_state() is adin1110_setup_rx_mode(), but
> the core calls ndo_set_rx_mode_async right after ndo_open, which already
> does that with the right flags. On the first open port_priv->flags is still 0,
> so calling it from open would briefly turn off broadcast reception.
> The hardware forwarding branch only applies to the ADIN2111.
OK, makes sense. I still feel like the probe path could be a bit more
unified so as to avoid this duplication, but maybe it's more
straightforward to achieve when tc6 support is added for ADIN2111.
>
>
> > Would it make sense to use the async mode for the non-tc6 case as well?
> > Then you can drop the work there and have the same ndo callback for both.
>
> It would, but it changes the generic SPI path, which is out of scope
> for this series, and that path needs its own regression testing
> (including ADIN2111). I'd prefer to do it as a separate follow-up after this
> series, if that's OK.
Fair enough.
> > > +struct mii_bus;
> >
> > A mistake here? Doesn't seem related.
>
> It is needed. adin1110.c includes oa_tc6.h before linux/phy.h, and the
> Clause 45 MDIO prototypes in oa_tc6.h use struct mii_bus. Without the
> forward declaration a W=1 build fails with "'struct mii_bus' declared
> inside parameter list". I've explained this in the v2 commit message.
Sounds like this should be a separate patch. Since no drivers are
affected by it right now (I guess because they include linux/phy.h
before oa_tc6.h), it can probably just go into net-next as an earlier
patch in this series?
Kind regards,
Alvin