From: Greg Kroah-Hartman Date: Mon, 26 Jul 2021 10:44:56 +0000 (+0200) Subject: drop queue-5.13/net-dsa-sja1105-fix-address-learning-getting-disabled-on-the-cpu... X-Git-Tag: v4.4.277~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a31118de685af54dd9e6fae6f0259fd1c055dd7c;p=thirdparty%2Fkernel%2Fstable-queue.git drop queue-5.13/net-dsa-sja1105-fix-address-learning-getting-disabled-on-the-cpu-port.patch --- diff --git a/queue-5.13/net-dsa-sja1105-fix-address-learning-getting-disabled-on-the-cpu-port.patch b/queue-5.13/net-dsa-sja1105-fix-address-learning-getting-disabled-on-the-cpu-port.patch deleted file mode 100644 index 57959cf2491..00000000000 --- a/queue-5.13/net-dsa-sja1105-fix-address-learning-getting-disabled-on-the-cpu-port.patch +++ /dev/null @@ -1,62 +0,0 @@ -From b0b33b048dcfbd7da82c3cde4fab02751dfab4d6 Mon Sep 17 00:00:00 2001 -From: Vladimir Oltean -Date: Tue, 13 Jul 2021 12:37:19 +0300 -Subject: net: dsa: sja1105: fix address learning getting disabled on the CPU port - -From: Vladimir Oltean - -commit b0b33b048dcfbd7da82c3cde4fab02751dfab4d6 upstream. - -In May 2019 when commit 640f763f98c2 ("net: dsa: sja1105: Add support -for Spanning Tree Protocol") was introduced, the comment that "STP does -not get called for the CPU port" was true. This changed after commit -0394a63acfe2 ("net: dsa: enable and disable all ports") in August 2019 -and went largely unnoticed, because the sja1105_bridge_stp_state_set() -method did nothing different compared to the static setup done by -sja1105_init_mac_settings(). - -With the ability to turn address learning off introduced by the blamed -commit, there is a new priv->learn_ena port mask in the driver. When -sja1105_bridge_stp_state_set() gets called and we are in -BR_STATE_LEARNING or later, address learning is enabled or not depending -on priv->learn_ena & BIT(port). - -So what happens is that priv->learn_ena is not being set from anywhere -for the CPU port, and the static configuration done by -sja1105_init_mac_settings() is being overwritten. - -To solve this, acknowledge that the static configuration of STP state is -no longer necessary because the STP state is being set by the DSA core -now, but what is necessary is to set priv->learn_ena for the CPU port. - -Fixes: 4d9423549501 ("net: dsa: sja1105: offload bridge port flags to device") -Signed-off-by: Vladimir Oltean -Signed-off-by: David S. Miller -Signed-off-by: Greg Kroah-Hartman ---- - drivers/net/dsa/sja1105/sja1105_main.c | 14 ++++++-------- - 1 file changed, 6 insertions(+), 8 deletions(-) - ---- a/drivers/net/dsa/sja1105/sja1105_main.c -+++ b/drivers/net/dsa/sja1105/sja1105_main.c -@@ -129,14 +129,12 @@ static int sja1105_init_mac_settings(str - - for (i = 0; i < SJA1105_NUM_PORTS; i++) { - mac[i] = default_mac; -- if (i == dsa_upstream_port(priv->ds, i)) { -- /* STP doesn't get called for CPU port, so we need to -- * set the I/O parameters statically. -- */ -- mac[i].dyn_learn = true; -- mac[i].ingress = true; -- mac[i].egress = true; -- } -+ -+ /* Let sja1105_bridge_stp_state_set() keep address learning -+ * enabled for the CPU port. -+ */ -+ if (dsa_is_cpu_port(ds, i)) -+ priv->learn_ena |= BIT(i); - } - - return 0; diff --git a/queue-5.13/series b/queue-5.13/series index 95bcee5ca24..53db7a68156 100644 --- a/queue-5.13/series +++ b/queue-5.13/series @@ -215,7 +215,6 @@ bonding-fix-build-issue.patch mptcp-fix-masking-a-bool-warning.patch skbuff-release-nfct-refcount-on-napi-stolen-or-re-used-skbs.patch arm-multi_v7_defconfig-make-nop_usb_xceiv-driver-built-in.patch -net-dsa-sja1105-fix-address-learning-getting-disabled-on-the-cpu-port.patch documentation-fix-intiramfs-script-name.patch arm64-entry-fix-kcov-suppression.patch perf-inject-close-inject.output-on-exit.patch