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

From: "Russell King (Oracle)" <[email-masked]>
Date: Fri, 17 Oct 2025 16:04:02 +0100

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.

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!