[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1mpSbA-00BXob-MG@rmk-PC.armlinux.org.uk>
Date: Tue, 23 Nov 2021 10:00:24 +0000
From: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
To: Chris Snook <chris.snook@...il.com>, Felix Fietkau <nbd@....name>,
Florian Fainelli <f.fainelli@...il.com>,
John Crispin <john@...ozen.org>,
Mark Lee <Mark-MC.Lee@...iatek.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Michal Simek <michal.simek@...inx.com>,
Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>,
Sean Wang <sean.wang@...iatek.com>,
Vivien Didelot <vivien.didelot@...il.com>,
Vladimir Oltean <olteanv@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Heiner Kallweit <hkallweit1@...il.com>,
Jakub Kicinski <kuba@...nel.org>,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, netdev@...r.kernel.org
Subject: [PATCH RFC net-next 3/8] net: dsa: mark DSA phylink as
legacy_pre_march2020
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) <rmk+kernel@...linux.org.uk>
---
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
Powered by blists - more mailing lists