mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 23:12:32 +00:00
590aa0ca51
Manually rebase: pending-5.15/330-MIPS-kexec-Accept-command-line-parameters-from-users.patch ath79/patches-5.15/910-unaligned_access_hacks.patch All other patches automatically rebased Build system: x86_64 Build-tested: bcm2711/RPi4B Run-tested: bcm2711/RPi4B Signed-off-by: John Audia <therealgraysky@proton.me>
37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
From 0a9f0794d9bd67e590a9488afe87fbb0419d9539 Mon Sep 17 00:00:00 2001
|
|
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
|
|
Date: Thu, 9 Dec 2021 13:11:38 +0000
|
|
Subject: [PATCH] net: dsa: mark DSA phylink as legacy_pre_march2020
|
|
|
|
The majority of DSA drivers do not make use of the PCS support, and
|
|
thus operate in legacy mode. In order to preserve this behaviour in
|
|
future, we need to set the legacy_pre_march2020 flag so phylink knows
|
|
this may require the legacy calls.
|
|
|
|
There are some DSA drivers that do make use of PCS support, and these
|
|
will continue operating as before - legacy_pre_march2020 will not
|
|
prevent split-PCS support enabling the newer phylink behaviour.
|
|
|
|
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
|
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
---
|
|
net/dsa/port.c | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
--- a/net/dsa/port.c
|
|
+++ b/net/dsa/port.c
|
|
@@ -1126,6 +1126,13 @@ int dsa_port_phylink_create(struct dsa_p
|
|
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_caps)
|
|
ds->ops->phylink_get_caps(ds, dp->index, &dp->pl_config);
|
|
|