Thread (17 messages) 17 messages, 4 authors, 2021-11-23
STALE1655d

[PATCH RFC net-next 3/8] net: dsa: mark DSA phylink as legacy_pre_march2020

From: Russell King (Oracle) <hidden>
Date: 2021-11-23 10:04:59
Also in: linux-mediatek, netdev
Subsystem: networking [dsa], networking [general], the rest · Maintainers: Andrew Lunn, Vladimir Oltean, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

As DSA doesn't make use of the PCS support, but it does have PCS, it
must be marked as a pre-March 2020 driver to maintain the old phylink
behaviour.

Signed-off-by: Russell King (Oracle) <redacted>
---
 net/dsa/port.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/net/dsa/port.c b/net/dsa/port.c
index eaa66114924b..cfb48dc57f73 100644
--- a/net/dsa/port.c
+++ b/net/dsa/port.c
@@ -1091,6 +1091,13 @@ int dsa_port_phylink_create(struct dsa_port *dp)
 	if (err)
 		mode = PHY_INTERFACE_MODE_NA;
 
+	/* Presence of phylink_mac_link_state or phylink_mac_an_restart is
+	 * an indicator of a legacy phylink driver.
+	 */
+	if (ds->ops->phylink_mac_link_state ||
+	    ds->ops->phylink_mac_an_restart)
+		dp->pl_config.legacy_pre_march2020 = true;
+
 	if (ds->ops->phylink_get_interfaces)
 		ds->ops->phylink_get_interfaces(ds, dp->index,
 					dp->pl_config.supported_interfaces);
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help