[PATCH net-next v12 08/18] net: ethernet: mtk_eth_soc: fix 1000Base-X and 2500Base-X modes

Russell King (Oracle) linux at armlinux.org.uk
Wed Mar 8 06:12:12 PST 2023


On Wed, Mar 08, 2023 at 03:46:42PM +0200, Vladimir Oltean wrote:
> On Wed, Mar 08, 2023 at 01:12:10PM +0000, Russell King (Oracle) wrote:
> > So, what I would want to do is to move the decision about whether
> > the PCS should enable in-band into the phylink core code instead
> > of these random decisions being made in each PCS.
> > 
> > At that point, we can then make the decision about whether the
> > ethtool autoneg bit should affect whether the PCS uses inband
> > depending on whether the PCS is effectively the media facing
> > entity, or whether there is a PHY attached - and if there is a PHY
> > attached, ask the PHY whether it will be using in-band or not.
> > 
> > This also would give a way to ensure that all PCS adopt the same
> > behaviour.
> > 
> > Does that sound a reasonable approach?
> > 
> > Strangely, I already have some patches along those lines in my
> > net-queue branch. See:
> > 
> > net: phylink: add helpers for decoding mode
> > net: use phylink_mode_*() helpers
> > net: phylink: split PCS in-band from inband mode
> > 
> > It's nowhere near finished though, it was just an idea back in
> > 2021 when the problem of getting rid of differing PCS behaviours
> > was on my mind.
> 
> Having looked at those patches
> (http://git.armlinux.org.uk/cgit/linux-arm.git/commit/?h=net-queue&id=a632167d226cf95d92cd887b2f1678e1539833b1)
> and seen the way in which they are incomplete, could you sketch here how
> do you see an actual pcs_validate() implementation making use of the new
> "mode" argument?
> 
> I'd expect there to be some logic which changes the "mode", if the PCS
> validation with the existing one fails... or?

You may notice that I explicitly didn't include the patches adding the
mode argument to the validation path, precisely because that's an
unanswered question.

I haven't done much work in this area because I gave up with trying to
convert mv88e6xxx to phylink_pcs because it just became impossible
due to the history of the driver - and that destroyed my motivation
for further work, because that would mean I'd just accumulate more
and more patches. You may have noticed that I'm hardly doing any
development work on phylink over the last few months, instead
concentrating on problem non-DSA network drivers.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!



More information about the linux-arm-kernel mailing list