OSDN Git Service

net: dsa: ocelot: mark as non-legacy
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 25 Feb 2022 16:19:41 +0000 (16:19 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Feb 2022 12:44:29 +0000 (12:44 +0000)
The ocelot DSA driver does not make use of the speed, duplex, pause or
advertisement in its phylink_mac_config() implementation, so it can be
marked as a non-legacy driver.

Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/ocelot/felix.c

index bfc756c..1d7c5d7 100644 (file)
@@ -783,6 +783,12 @@ static void felix_phylink_get_caps(struct dsa_switch *ds, int port,
 {
        struct ocelot *ocelot = ds->priv;
 
+       /* This driver does not make use of the speed, duplex, pause or the
+        * advertisement in its mac_config, so it is safe to mark this driver
+        * as non-legacy.
+        */
+       config->legacy_pre_march2020 = false;
+
        __set_bit(ocelot->ports[port]->phy_mode,
                  config->supported_interfaces);
 }