Re: [PATCH net-next 3/4] net: stmmac: Add glue driver for Motorcomm YT6801 ethernet controller

Yao Zi
2025-10-18T08:22:12Z

On Fri, Oct 17, 2025 at 04:04:02PM +0100, Russell King (Oracle) wrote:
> On Fri, Oct 17, 2025 at 04:56:23PM +0200, Andrew Lunn wrote:
> > > Though it's still unclear the exact effect of the bit on the PHY since
> > > there's no public documentation, it's essential to deassert it in MAC
> > > code before registering and scanning the MDIO bus, or we could even not
> > > probe the PHY correctly.
> > >
> > > For the motorcomm_reset_phy() performed in probe function, it happens
> > > before the registration of MDIO bus, and the PHY isn't probed yet, thus
> > > I think it should be okay.
> >
> > Since it resets more than the PHY, it probably should have a different
> > name, and maybe a comment describing what is actually resets.
>
> I want to back Andrew's comment here up very strongly.
>
> You will not be the only one looking at this code. There are other
> people (e.g. me) who are looking at e.g. the core stmmac code, making
> changes to it, which impact the platform glue as well.
>
> The platform glue needs to be understandable to those of us who don't
> have knowledge of your platform, so that we can make sense of it and
> know what it's actually doing, and thus be able to adapt it when we
> push out changes to the core that affect platform glue.

Thanks, that's a really reasonable point to me. At the time of writing
these register offsets, their exact effects are still unclear to me and
I just copied their names from the vendor driver.

Will comment about the effects of EPHY_RESET and give the offset a more
self-descriptive name (maybe MDIO_PHY_RESET) in v2.

> Sadly, it seems 99.9% of platform glue is "dump it into the kernel
> and run away".
>
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Best regards,
Yao Zi