Subject: Re: [net-next: PATCH] net: dsa: mv88e6xxx: fix speed setting for CPU/DSA ports

From: "Russell King (Oracle)" <[email-masked]>
Date: Thu, 14 Jul 2022 20:44:38 +0100

On Thu, Jul 14, 2022 at 07:18:57PM +0200, Marcin Wojtas wrote:
> Hi Russell,
> 
> czw., 14 lip 2022 o 14:32 Russell King (Oracle)
> <[email-masked]> napisał(a):
> >
> > On Thu, Jul 14, 2022 at 03:00:21AM +0200, Marcin Wojtas wrote:
> > > Commit 3c783b83bd0f ("net: dsa: mv88e6xxx: get rid of SPEED_MAX setting")
> > > stopped relying on SPEED_MAX constant and hardcoded speed settings
> > > for the switch ports and rely on phylink configuration.
> > >
> > > It turned out, however, that when the relevant code is called,
> > > the mac_capabilites of CPU/DSA port remain unset.
> > > mv88e6xxx_setup_port() is called via mv88e6xxx_setup() in
> > > dsa_tree_setup_switches(), which precedes setting the caps in
> > > phylink_get_caps down in the chain of dsa_tree_setup_ports().
> > >
> > > As a result the mac_capabilites are 0 and the default speed for CPU/DSA
> > > port is 10M at the start. To fix that execute phylink_get_caps() callback
> > > which fills port's mac_capabilities before they are processed.
> > >
> > > Fixes: 3c783b83bd0f ("net: dsa: mv88e6xxx: get rid of SPEED_MAX setting")
> > > Signed-off-by: Marcin Wojtas <[email-masked]>
> >
> > Please don't merge this - the plan is to submit the RFC series I sent on
> > Wednesday which deletes this code, and I'd rather not re-spin the series
> > and go through the testing again because someone else changed the code.
> 
> Thank for the heads-up. Are you planning to resend the series or
> willing to get it merged as-is? I have perhaps one comment, but I can
> apply it later as a part of fwnode_/device_ migration.
> 
> >
> > Marcin - please can you test with my RFC series, which can be found at:
> >
> > https://lore.kernel.org/all/[email-masked]/
> >
> 
> The thing is my v2 of DSA fwnode_/device_ migration is tested and
> ready to send. There will be conflicts (rather easy) with your
> patchset - I volunteer to resolve it this way or another, depending on
> what lands first. I have 2 platforms to test it with + also ACPI case
> locally.
> 
> I'd like to make things as smooth as possible and make it before the
> upcoming merge window - please share your thoughts on this.

I've also been trying to get the mv88e6xxx PCS conversion in, but
it's been held up because there's a fundamental problem in DSA that
this series is addressing.

This series is addressing a faux pas on my part, where I had forgotten
that phylink doesn't get used in DSA unless firmware specifies a
fixed-link (or a PHY) - in other words when the firmware lacks a
description of the link.

So, what do we do...

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