From: Greg Kroah-Hartman Date: Mon, 9 May 2022 11:17:21 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v4.9.313~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d2184b1a25dd99e3a04cbf91d5510807d57f58b0;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: selftests-mirror_gre_bridge_1q-avoid-changing-pvid-while-interface-is-operational.patch smsc911x-allow-using-irq0.patch --- diff --git a/queue-4.19/selftests-mirror_gre_bridge_1q-avoid-changing-pvid-while-interface-is-operational.patch b/queue-4.19/selftests-mirror_gre_bridge_1q-avoid-changing-pvid-while-interface-is-operational.patch new file mode 100644 index 00000000000..24e6ef89677 --- /dev/null +++ b/queue-4.19/selftests-mirror_gre_bridge_1q-avoid-changing-pvid-while-interface-is-operational.patch @@ -0,0 +1,50 @@ +From 3122257c02afd9f199a8fc84ae981e1fc4958532 Mon Sep 17 00:00:00 2001 +From: Ido Schimmel +Date: Mon, 2 May 2022 11:45:07 +0300 +Subject: selftests: mirror_gre_bridge_1q: Avoid changing PVID while interface is operational + +From: Ido Schimmel + +commit 3122257c02afd9f199a8fc84ae981e1fc4958532 upstream. + +In emulated environments, the bridge ports enslaved to br1 get a carrier +before changing br1's PVID. This means that by the time the PVID is +changed, br1 is already operational and configured with an IPv6 +link-local address. + +When the test is run with netdevs registered by mlxsw, changing the PVID +is vetoed, as changing the VID associated with an existing L3 interface +is forbidden. This restriction is similar to the 8021q driver's +restriction of changing the VID of an existing interface. + +Fix this by taking br1 down and bringing it back up when it is fully +configured. + +With this fix, the test reliably passes on top of both the SW and HW +data paths (emulated or not). + +Fixes: 239e754af854 ("selftests: forwarding: Test mirror-to-gretap w/ UL 802.1q") +Signed-off-by: Ido Schimmel +Reviewed-by: Petr Machata +Link: https://lore.kernel.org/r/20220502084507.364774-1-idosch@nvidia.com +Signed-off-by: Paolo Abeni +Signed-off-by: Greg Kroah-Hartman +--- + tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh ++++ b/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh +@@ -61,9 +61,12 @@ setup_prepare() + + vrf_prepare + mirror_gre_topo_create ++ # Avoid changing br1's PVID while it is operational as a L3 interface. ++ ip link set dev br1 down + + ip link set dev $swp3 master br1 + bridge vlan add dev br1 vid 555 pvid untagged self ++ ip link set dev br1 up + ip address add dev br1 192.0.2.129/28 + ip address add dev br1 2001:db8:2::1/64 + diff --git a/queue-4.19/series b/queue-4.19/series index 70252ffafd9..3a7a6d3b023 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -74,3 +74,5 @@ hwmon-adt7470-fix-warning-on-module-removal.patch asoc-dmaengine-restore-null-prepare_slave_config-callback.patch net-stmmac-dwmac-sun8i-add-missing-of_node_put-in-sun8i_dwmac_register_mdio_mux.patch net-emaclite-add-error-handling-for-of_address_to_resource.patch +selftests-mirror_gre_bridge_1q-avoid-changing-pvid-while-interface-is-operational.patch +smsc911x-allow-using-irq0.patch diff --git a/queue-4.19/smsc911x-allow-using-irq0.patch b/queue-4.19/smsc911x-allow-using-irq0.patch new file mode 100644 index 00000000000..41c808c5ca2 --- /dev/null +++ b/queue-4.19/smsc911x-allow-using-irq0.patch @@ -0,0 +1,42 @@ +From 5ef9b803a4af0f5e42012176889b40bb2a978b18 Mon Sep 17 00:00:00 2001 +From: Sergey Shtylyov +Date: Mon, 2 May 2022 23:14:09 +0300 +Subject: smsc911x: allow using IRQ0 + +From: Sergey Shtylyov + +commit 5ef9b803a4af0f5e42012176889b40bb2a978b18 upstream. + +The AlphaProject AP-SH4A-3A/AP-SH4AD-0A SH boards use IRQ0 for their SMSC +LAN911x Ethernet chip, so the networking on them must have been broken by +commit 965b2aa78fbc ("net/smsc911x: fix irq resource allocation failure") +which filtered out 0 as well as the negative error codes -- it was kinda +correct at the time, as platform_get_irq() could return 0 on of_irq_get() +failure and on the actual 0 in an IRQ resource. This issue was fixed by +me (back in 2016!), so we should be able to fix this driver to allow IRQ0 +usage again... + +When merging this to the stable kernels, make sure you also merge commit +e330b9a6bb35 ("platform: don't return 0 from platform_get_irq[_byname]() +on error") -- that's my fix to platform_get_irq() for the DT platforms... + +Fixes: 965b2aa78fbc ("net/smsc911x: fix irq resource allocation failure") +Signed-off-by: Sergey Shtylyov +Link: https://lore.kernel.org/r/656036e4-6387-38df-b8a7-6ba683b16e63@omp.ru +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/smsc/smsc911x.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/smsc/smsc911x.c ++++ b/drivers/net/ethernet/smsc/smsc911x.c +@@ -2446,7 +2446,7 @@ static int smsc911x_drv_probe(struct pla + if (irq == -EPROBE_DEFER) { + retval = -EPROBE_DEFER; + goto out_0; +- } else if (irq <= 0) { ++ } else if (irq < 0) { + pr_warn("Could not allocate irq resource\n"); + retval = -ENODEV; + goto out_0;