Re: [PATCH net-next 5/7] net: lan743x: Add support to the Phylink framework

From: Russell King (Oracle)
Date: Fri Jul 21 2023 - 07:57:06 EST


On Fri, Jul 21, 2023 at 09:49:06AM +0100, Russell King (Oracle) wrote:
> On Fri, Jul 21, 2023 at 11:30:17AM +0530, Raju Lakkaraju wrote:
> > +static void lan743x_phylink_mac_config(struct phylink_config *config,
> > + unsigned int link_an_mode,
> > + const struct phylink_link_state *state)
> > +{
> > + struct net_device *netdev = to_net_dev(config->dev);
> > + struct lan743x_adapter *adapter = netdev_priv(netdev);
> > + bool status;
> > + int ret;
> > +
> > + lan743x_mac_cfg_update(adapter, state->link, state->speed,
> > + state->advertising);
>
> Please, no new state->speed users in mac_config().

I have just submitted a patch series that results in state->speed always
being set to SPEED_UNKNOWN when this function is called to prevent
future uses of this struct member.

> > + adapter->phylink_config.dev = &netdev->dev;
> > + adapter->phylink_config.type = PHYLINK_NETDEV;
> > + adapter->phylink_config.mac_managed_pm = true;
> > + /* This driver makes use of state->speed in mac_config */
> > + adapter->phylink_config.legacy_pre_march2020 = true;
>
> Sorry, but no new users of legacy features.

... and which totally strips out the legacy phylink code, which I've
been wanting to remove for the last three years.

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