aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/patches-4.19/402-net-phylink-only-call-mac_config-during-resolve-when.patch
diff options
context:
space:
mode:
authorMarko Ratkaj <marko.ratkaj@sartura.hr>2019-06-13 16:40:46 +0200
committerPetr Štetiar <ynezz@true.cz>2019-06-17 09:36:03 +0200
commit98684d99b25033f01eae0c25110e660620253b82 (patch)
treea0786a8c40a58c1ddfd5934628c938741b892864 /target/linux/mvebu/patches-4.19/402-net-phylink-only-call-mac_config-during-resolve-when.patch
parent7046a249d8173212fe6bb7f5a4802d6e66ee15f2 (diff)
downloadupstream-98684d99b25033f01eae0c25110e660620253b82.tar.gz
upstream-98684d99b25033f01eae0c25110e660620253b82.tar.bz2
upstream-98684d99b25033f01eae0c25110e660620253b82.zip
mvebu: add kernel 4.19 support
Signed-off-by: Marko Ratkaj <marko.ratkaj@sartura.hr> [added sfp related patches from Russell King] Signed-off-by: Marek Behún <marek.behun@nic.cz> [rebase; rework patches; separate and cleanup kernel configs; add espessobin dts; adjust venom dts] Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
Diffstat (limited to 'target/linux/mvebu/patches-4.19/402-net-phylink-only-call-mac_config-during-resolve-when.patch')
-rw-r--r--target/linux/mvebu/patches-4.19/402-net-phylink-only-call-mac_config-during-resolve-when.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-4.19/402-net-phylink-only-call-mac_config-during-resolve-when.patch b/target/linux/mvebu/patches-4.19/402-net-phylink-only-call-mac_config-during-resolve-when.patch
new file mode 100644
index 0000000000..0dc2605077
--- /dev/null
+++ b/target/linux/mvebu/patches-4.19/402-net-phylink-only-call-mac_config-during-resolve-when.patch
@@ -0,0 +1,44 @@
+From 6f3ea4e5b1f0867ec217f6101fcb89783ed905d7 Mon Sep 17 00:00:00 2001
+From: Russell King <rmk+kernel@armlinux.org.uk>
+Date: Sat, 9 Feb 2019 18:23:26 +0000
+Subject: [PATCH] net: phylink: only call mac_config() during resolve
+ when link is up
+
+There's little point calling mac_config() when the link is down.
+
+Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
+---
+ drivers/net/phy/phylink.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/phy/phylink.c
++++ b/drivers/net/phy/phylink.c
+@@ -333,6 +333,13 @@ static void phylink_mac_config(struct ph
+ pl->ops->mac_config(pl->netdev, pl->link_an_mode, state);
+ }
+
++static void phylink_mac_config_up(struct phylink *pl,
++ const struct phylink_link_state *state)
++{
++ if (state->link)
++ phylink_mac_config(pl, state);
++}
++
+ static void phylink_mac_an_restart(struct phylink *pl)
+ {
+ if (pl->link_config.an_enabled &&
+@@ -436,12 +443,12 @@ static void phylink_resolve(struct work_
+ case MLO_AN_PHY:
+ link_state = pl->phy_state;
+ phylink_resolve_flow(pl, &link_state);
+- phylink_mac_config(pl, &link_state);
++ phylink_mac_config_up(pl, &link_state);
+ break;
+
+ case MLO_AN_FIXED:
+ phylink_get_fixed_state(pl, &link_state);
+- phylink_mac_config(pl, &link_state);
++ phylink_mac_config_up(pl, &link_state);
+ break;
+
+ case MLO_AN_INBAND: