On Thu, Nov 18, 2021 at 06:33:01PM +0100, Marek Behún wrote: > On Thu, 18 Nov 2021 17:08:10 +0000 > "Russell King (Oracle)" <linux@xxxxxxxxxxxxxxx> wrote: > > > I'm quite certain that as we try to develop phylink, such as adding > > extra facilities like specifying the interface modes, we're going to > > end up running into these kinds of problems that we can't solve, and > > we are going to have to keep compatibility for the old ways of doing > > stuff going for years to come - which is just going to get more and > > more painful. > > One way to move this forward would be to check compatible of the > corresponding MAC in this new function. If it belongs to an unconverted > driver, we can ensure the old behaviour. This would require to add a > comment to the driver saying "if you convert this, please drop the > exception in phylink_update_phy_modes()". That could work when drivers pass the fwnode as the "device" node. Some drivers don't do that, they pass a sub-node instead - such as mvpp2. However, mvpp2 is of course up to date with all phylink developments. However, the same issue exists with DSA - the fwnode passed to phylink doesn't have a compatible. I suppose we could walk up the fwnode tree until we do find a node with a compatible property, that may work. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!