Subject: Re: [PATCH v1] net: dsa: sja1105: add 100baseT1_Full support

From: Russell King - ARM Linux admin <[email-masked]>
Date: Tue, 3 Mar 2020 13:44:53 +0000

On Tue, Mar 03, 2020 at 12:04:04PM +0200, Vladimir Oltean wrote:
> On Tue, 3 Mar 2020 at 09:44, Oleksij Rempel <[email-masked]> wrote:
> >
> > Validate 100baseT1_Full to make this driver work with TJA1102 PHY.
> >
> > Signed-off-by: Oleksij Rempel <[email-masked]>
> > ---
> 
> I was expecting this patch sooner or later.
> 
> Acked-by: Vladimir Oltean <[email-masked]>
> 
> I should take this opportunity and express the fact that it is strange
> for MAC drivers to have to sign off all possible copper and fiber
> media types in their .phylink_validate method. Sooner or later
> somebody is going to want to add 1000Base-T1 too. I don't think it is
> going to scale very well. Russell, with your plan to make MAC drivers
> just populate a bitmap of phy_modes (MII side), is it also going to
> get rid of media side validation?

You're touching on a concern I've had for some time that the link modes
mix together several different parameters: speed, duplex, and media.

What we actually want for a MAC is to know which speeds and duplexes
they support for each interface mode, and then translate that to the
ethtool link modes as appropriate.  That isn't a problem I've addressed
yet, but something that could be addressed.

I've just updated my net-queue with a bunch of stuff that's been
sitting in other branches (some published, some not), which includes
the PHY_INTERFACE_MODE bitmap changes - everything from and including
"net: mvpp2: add port support helpers" concerns the bitmap stuff.

At the moment, it has to support both the new bitmap solution and the
legacy solution, but hopefully in time we can drop the legacy solution.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up