From 14f30785dc16c3097d3e01a1ae854c5d4078da04 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Mon, 11 Jul 2022 01:36:10 -0400 Subject: [PATCH] Fixes for 4.19 Signed-off-by: Sasha Levin --- ...-proper-compatible-for-sama5d2-s-rtc.patch | 36 +++++++++++ ...fcount-leak-in-meson_smp_prepare_cpu.patch | 46 ++++++++++++++ ...gister-the-clk-notifier-in-error-pat.patch | 37 +++++++++++ ...-dispose-of-all-skbs-during-a-failov.patch | 50 +++++++++++++++ ...3t-fix-nand-function-name-for-some-p.patch | 61 +++++++++++++++++++ ...ding-fix-error-message-in-learning_t.patch | 38 ++++++++++++ ...ding-fix-flood_unicast_test-when-h2-.patch | 61 +++++++++++++++++++ ...ding-fix-learning_test-when-h1-suppo.patch | 50 +++++++++++++++ queue-4.19/series | 8 +++ 9 files changed, 387 insertions(+) create mode 100644 queue-4.19/arm-at91-pm-use-proper-compatible-for-sama5d2-s-rtc.patch create mode 100644 queue-4.19/arm-meson-fix-refcount-leak-in-meson_smp_prepare_cpu.patch create mode 100644 queue-4.19/i2c-cadence-unregister-the-clk-notifier-in-error-pat.patch create mode 100644 queue-4.19/ibmvnic-properly-dispose-of-all-skbs-during-a-failov.patch create mode 100644 queue-4.19/pinctrl-sunxi-a83t-fix-nand-function-name-for-some-p.patch create mode 100644 queue-4.19/selftests-forwarding-fix-error-message-in-learning_t.patch create mode 100644 queue-4.19/selftests-forwarding-fix-flood_unicast_test-when-h2-.patch create mode 100644 queue-4.19/selftests-forwarding-fix-learning_test-when-h1-suppo.patch diff --git a/queue-4.19/arm-at91-pm-use-proper-compatible-for-sama5d2-s-rtc.patch b/queue-4.19/arm-at91-pm-use-proper-compatible-for-sama5d2-s-rtc.patch new file mode 100644 index 00000000000..e266e4fa2dd --- /dev/null +++ b/queue-4.19/arm-at91-pm-use-proper-compatible-for-sama5d2-s-rtc.patch @@ -0,0 +1,36 @@ +From 5f5638305259f18e6370b9f16969bbc1e740b145 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 23 May 2022 12:24:19 +0300 +Subject: ARM: at91: pm: use proper compatible for sama5d2's rtc + +From: Claudiu Beznea + +[ Upstream commit ddc980da8043779119acaca106c6d9b445c9b65b ] + +Use proper compatible strings for SAMA5D2's RTC IPs. This is necessary +for configuring wakeup sources for ULP1 PM mode. + +Fixes: d7484f5c6b3b ("ARM: at91: pm: configure wakeup sources for ULP1 mode") +Signed-off-by: Claudiu Beznea +Link: https://lore.kernel.org/r/20220523092421.317345-2-claudiu.beznea@microchip.com +Signed-off-by: Sasha Levin +--- + arch/arm/mach-at91/pm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c +index 21bfe9b6e16a..3ba0c6c560d8 100644 +--- a/arch/arm/mach-at91/pm.c ++++ b/arch/arm/mach-at91/pm.c +@@ -95,7 +95,7 @@ static const struct wakeup_source_info ws_info[] = { + + static const struct of_device_id sama5d2_ws_ids[] = { + { .compatible = "atmel,sama5d2-gem", .data = &ws_info[0] }, +- { .compatible = "atmel,at91rm9200-rtc", .data = &ws_info[1] }, ++ { .compatible = "atmel,sama5d2-rtc", .data = &ws_info[1] }, + { .compatible = "atmel,sama5d3-udc", .data = &ws_info[2] }, + { .compatible = "atmel,at91rm9200-ohci", .data = &ws_info[2] }, + { .compatible = "usb-ohci", .data = &ws_info[2] }, +-- +2.35.1 + diff --git a/queue-4.19/arm-meson-fix-refcount-leak-in-meson_smp_prepare_cpu.patch b/queue-4.19/arm-meson-fix-refcount-leak-in-meson_smp_prepare_cpu.patch new file mode 100644 index 00000000000..8e4bf4ed116 --- /dev/null +++ b/queue-4.19/arm-meson-fix-refcount-leak-in-meson_smp_prepare_cpu.patch @@ -0,0 +1,46 @@ +From 62b30a1a2804cc4db4ec2801e77cb4b363fe46c9 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 12 May 2022 06:16:10 +0400 +Subject: ARM: meson: Fix refcount leak in meson_smp_prepare_cpus + +From: Miaoqian Lin + +[ Upstream commit 34d2cd3fccced12b958b8848e3eff0ee4296764c ] + +of_find_compatible_node() returns a node pointer with refcount +incremented, we should use of_node_put() on it when done. +Add missing of_node_put() to avoid refcount leak. + +Fixes: d850f3e5d296 ("ARM: meson: Add SMP bringup code for Meson8 and Meson8b") +Signed-off-by: Miaoqian Lin +Reviewed-by: Martin Blumenstingl +Signed-off-by: Neil Armstrong +Link: https://lore.kernel.org/r/20220512021611.47921-1-linmq006@gmail.com +Signed-off-by: Sasha Levin +--- + arch/arm/mach-meson/platsmp.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/arm/mach-meson/platsmp.c b/arch/arm/mach-meson/platsmp.c +index cad7ee8f0d6b..75e16a2c3c81 100644 +--- a/arch/arm/mach-meson/platsmp.c ++++ b/arch/arm/mach-meson/platsmp.c +@@ -81,6 +81,7 @@ static void __init meson_smp_prepare_cpus(const char *scu_compatible, + } + + sram_base = of_iomap(node, 0); ++ of_node_put(node); + if (!sram_base) { + pr_err("Couldn't map SRAM registers\n"); + return; +@@ -101,6 +102,7 @@ static void __init meson_smp_prepare_cpus(const char *scu_compatible, + } + + scu_base = of_iomap(node, 0); ++ of_node_put(node); + if (!scu_base) { + pr_err("Couldn't map SCU registers\n"); + return; +-- +2.35.1 + diff --git a/queue-4.19/i2c-cadence-unregister-the-clk-notifier-in-error-pat.patch b/queue-4.19/i2c-cadence-unregister-the-clk-notifier-in-error-pat.patch new file mode 100644 index 00000000000..f6e0fcc5568 --- /dev/null +++ b/queue-4.19/i2c-cadence-unregister-the-clk-notifier-in-error-pat.patch @@ -0,0 +1,37 @@ +From f052b3483b9b722d187449cc36e8572e9029de60 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 28 Jun 2022 12:12:16 -0700 +Subject: i2c: cadence: Unregister the clk notifier in error path + +From: Satish Nagireddy + +[ Upstream commit 3501f0c663063513ad604fb1b3f06af637d3396d ] + +This patch ensures that the clock notifier is unregistered +when driver probe is returning error. + +Fixes: df8eb5691c48 ("i2c: Add driver for Cadence I2C controller") +Signed-off-by: Satish Nagireddy +Tested-by: Lars-Peter Clausen +Reviewed-by: Michal Simek +Signed-off-by: Wolfram Sang +Signed-off-by: Sasha Levin +--- + drivers/i2c/busses/i2c-cadence.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c +index 2150afdcc083..273f57e277b3 100644 +--- a/drivers/i2c/busses/i2c-cadence.c ++++ b/drivers/i2c/busses/i2c-cadence.c +@@ -990,6 +990,7 @@ static int cdns_i2c_probe(struct platform_device *pdev) + return 0; + + err_clk_dis: ++ clk_notifier_unregister(id->clk, &id->clk_rate_change_nb); + clk_disable_unprepare(id->clk); + pm_runtime_set_suspended(&pdev->dev); + pm_runtime_disable(&pdev->dev); +-- +2.35.1 + diff --git a/queue-4.19/ibmvnic-properly-dispose-of-all-skbs-during-a-failov.patch b/queue-4.19/ibmvnic-properly-dispose-of-all-skbs-during-a-failov.patch new file mode 100644 index 00000000000..cd1c603ce28 --- /dev/null +++ b/queue-4.19/ibmvnic-properly-dispose-of-all-skbs-during-a-failov.patch @@ -0,0 +1,50 @@ +From fe2ee01e46d0a3acd7da907ae37a4657b3586b6c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 2 Jul 2022 03:37:12 -0700 +Subject: ibmvnic: Properly dispose of all skbs during a failover. + +From: Rick Lindsley + +[ Upstream commit 1b18f09d31cfa7148df15a7d5c5e0e86f105f7d1 ] + +During a reset, there may have been transmits in flight that are no +longer valid and cannot be fulfilled. Resetting and clearing the +queues is insufficient; each skb also needs to be explicitly freed +so that upper levels are not left waiting for confirmation of a +transmit that will never happen. If this happens frequently enough, +the apparent backlog will cause TCP to begin "congestion control" +unnecessarily, culminating in permanently decreased throughput. + +Fixes: d7c0ef36bde03 ("ibmvnic: Free and re-allocate scrqs when tx/rx scrqs change") +Tested-by: Nick Child +Reviewed-by: Brian King +Signed-off-by: Rick Lindsley +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/ibm/ibmvnic.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c +index ae3eea4a4213..1463cf4321a8 100644 +--- a/drivers/net/ethernet/ibm/ibmvnic.c ++++ b/drivers/net/ethernet/ibm/ibmvnic.c +@@ -4691,6 +4691,15 @@ static int ibmvnic_reset_init(struct ibmvnic_adapter *adapter) + release_sub_crqs(adapter, 0); + rc = init_sub_crqs(adapter); + } else { ++ /* no need to reinitialize completely, but we do ++ * need to clean up transmits that were in flight ++ * when we processed the reset. Failure to do so ++ * will confound the upper layer, usually TCP, by ++ * creating the illusion of transmits that are ++ * awaiting completion. ++ */ ++ clean_tx_pools(adapter); ++ + rc = reset_sub_crq_queues(adapter); + } + } else { +-- +2.35.1 + diff --git a/queue-4.19/pinctrl-sunxi-a83t-fix-nand-function-name-for-some-p.patch b/queue-4.19/pinctrl-sunxi-a83t-fix-nand-function-name-for-some-p.patch new file mode 100644 index 00000000000..a7a83343109 --- /dev/null +++ b/queue-4.19/pinctrl-sunxi-a83t-fix-nand-function-name-for-some-p.patch @@ -0,0 +1,61 @@ +From 53f5285f11bd8480133eb623d34724900bc0aaed Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 25 May 2022 21:49:56 -0500 +Subject: pinctrl: sunxi: a83t: Fix NAND function name for some pins + +From: Samuel Holland + +[ Upstream commit aaefa29270d9551b604165a08406543efa9d16f5 ] + +The other NAND pins on Port C use the "nand0" function name. +"nand0" also matches all of the other Allwinner SoCs. + +Fixes: 4730f33f0d82 ("pinctrl: sunxi: add allwinner A83T PIO controller support") +Signed-off-by: Samuel Holland +Acked-by: Jernej Skrabec +Link: https://lore.kernel.org/r/20220526024956.49500-1-samuel@sholland.org +Signed-off-by: Linus Walleij +Signed-off-by: Sasha Levin +--- + drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c +index 4ada80317a3b..b5c1a8f363f3 100644 +--- a/drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c ++++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c +@@ -158,26 +158,26 @@ static const struct sunxi_desc_pin sun8i_a83t_pins[] = { + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 14), + SUNXI_FUNCTION(0x0, "gpio_in"), + SUNXI_FUNCTION(0x1, "gpio_out"), +- SUNXI_FUNCTION(0x2, "nand"), /* DQ6 */ ++ SUNXI_FUNCTION(0x2, "nand0"), /* DQ6 */ + SUNXI_FUNCTION(0x3, "mmc2")), /* D6 */ + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 15), + SUNXI_FUNCTION(0x0, "gpio_in"), + SUNXI_FUNCTION(0x1, "gpio_out"), +- SUNXI_FUNCTION(0x2, "nand"), /* DQ7 */ ++ SUNXI_FUNCTION(0x2, "nand0"), /* DQ7 */ + SUNXI_FUNCTION(0x3, "mmc2")), /* D7 */ + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 16), + SUNXI_FUNCTION(0x0, "gpio_in"), + SUNXI_FUNCTION(0x1, "gpio_out"), +- SUNXI_FUNCTION(0x2, "nand"), /* DQS */ ++ SUNXI_FUNCTION(0x2, "nand0"), /* DQS */ + SUNXI_FUNCTION(0x3, "mmc2")), /* RST */ + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 17), + SUNXI_FUNCTION(0x0, "gpio_in"), + SUNXI_FUNCTION(0x1, "gpio_out"), +- SUNXI_FUNCTION(0x2, "nand")), /* CE2 */ ++ SUNXI_FUNCTION(0x2, "nand0")), /* CE2 */ + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 18), + SUNXI_FUNCTION(0x0, "gpio_in"), + SUNXI_FUNCTION(0x1, "gpio_out"), +- SUNXI_FUNCTION(0x2, "nand")), /* CE3 */ ++ SUNXI_FUNCTION(0x2, "nand0")), /* CE3 */ + /* Hole */ + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 2), + SUNXI_FUNCTION(0x0, "gpio_in"), +-- +2.35.1 + diff --git a/queue-4.19/selftests-forwarding-fix-error-message-in-learning_t.patch b/queue-4.19/selftests-forwarding-fix-error-message-in-learning_t.patch new file mode 100644 index 00000000000..b53a4d542c1 --- /dev/null +++ b/queue-4.19/selftests-forwarding-fix-error-message-in-learning_t.patch @@ -0,0 +1,38 @@ +From 7d5e9586659c70e3510b9fdbb31fc46ad5a6360c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 3 Jul 2022 10:36:26 +0300 +Subject: selftests: forwarding: fix error message in learning_test + +From: Vladimir Oltean + +[ Upstream commit 83844aacab2015da1dba1df0cc61fc4b4c4e8076 ] + +When packets are not received, they aren't received on $host1_if, so the +message talking about the second host not receiving them is incorrect. +Fix it. + +Fixes: d4deb01467ec ("selftests: forwarding: Add a test for FDB learning") +Signed-off-by: Vladimir Oltean +Reviewed-by: Ido Schimmel +Signed-off-by: Paolo Abeni +Signed-off-by: Sasha Levin +--- + tools/testing/selftests/net/forwarding/lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh +index 054f776c3843..ee03552b4116 100644 +--- a/tools/testing/selftests/net/forwarding/lib.sh ++++ b/tools/testing/selftests/net/forwarding/lib.sh +@@ -830,7 +830,7 @@ learning_test() + tc -j -s filter show dev $host1_if ingress \ + | jq -e ".[] | select(.options.handle == 101) \ + | select(.options.actions[0].stats.packets == 1)" &> /dev/null +- check_fail $? "Packet reached second host when should not" ++ check_fail $? "Packet reached first host when should not" + + $MZ $host1_if -c 1 -p 64 -a $mac -t ip -q + sleep 1 +-- +2.35.1 + diff --git a/queue-4.19/selftests-forwarding-fix-flood_unicast_test-when-h2-.patch b/queue-4.19/selftests-forwarding-fix-flood_unicast_test-when-h2-.patch new file mode 100644 index 00000000000..43a2e694273 --- /dev/null +++ b/queue-4.19/selftests-forwarding-fix-flood_unicast_test-when-h2-.patch @@ -0,0 +1,61 @@ +From 04eaca424fc7b8f46c9021b9336b1b664198bbd5 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 3 Jul 2022 10:36:24 +0300 +Subject: selftests: forwarding: fix flood_unicast_test when h2 supports + IFF_UNICAST_FLT + +From: Vladimir Oltean + +[ Upstream commit b8e629b05f5d23f9649c901bef09fab8b0c2e4b9 ] + +As mentioned in the blamed commit, flood_unicast_test() works by +checking the match count on a tc filter placed on the receiving +interface. + +But the second host interface (host2_if) has no interest in receiving a +packet with MAC DA de:ad:be:ef:13:37, so its RX filter drops it even +before the ingress tc filter gets to be executed. So we will incorrectly +get the message "Packet was not flooded when should", when in fact, the +packet was flooded as expected but dropped due to an unrelated reason, +at some other layer on the receiving side. + +Force h2 to accept this packet by temporarily placing it in promiscuous +mode. Alternatively we could either deliver to its MAC address or use +tcpdump_start, but this has the fewest complications. + +This fixes the "flooding" test from bridge_vlan_aware.sh and +bridge_vlan_unaware.sh, which calls flood_test from the lib. + +Fixes: 236dd50bf67a ("selftests: forwarding: Add a test for flooded traffic") +Signed-off-by: Vladimir Oltean +Reviewed-by: Ido Schimmel +Tested-by: Ido Schimmel +Signed-off-by: Paolo Abeni +Signed-off-by: Sasha Levin +--- + tools/testing/selftests/net/forwarding/lib.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh +index 08bac6cf1bb3..4d98e8940095 100644 +--- a/tools/testing/selftests/net/forwarding/lib.sh ++++ b/tools/testing/selftests/net/forwarding/lib.sh +@@ -885,6 +885,7 @@ flood_test_do() + + # Add an ACL on `host2_if` which will tell us whether the packet + # was flooded to it or not. ++ ip link set $host2_if promisc on + tc qdisc add dev $host2_if ingress + tc filter add dev $host2_if ingress protocol ip pref 1 handle 101 \ + flower dst_mac $mac action drop +@@ -902,6 +903,7 @@ flood_test_do() + + tc filter del dev $host2_if ingress protocol ip pref 1 handle 101 flower + tc qdisc del dev $host2_if ingress ++ ip link set $host2_if promisc off + + return $err + } +-- +2.35.1 + diff --git a/queue-4.19/selftests-forwarding-fix-learning_test-when-h1-suppo.patch b/queue-4.19/selftests-forwarding-fix-learning_test-when-h1-suppo.patch new file mode 100644 index 00000000000..f089b34357a --- /dev/null +++ b/queue-4.19/selftests-forwarding-fix-learning_test-when-h1-suppo.patch @@ -0,0 +1,50 @@ +From 3ce0e3d109d1f559b4bbd304dedee9bcde9bd37a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 3 Jul 2022 10:36:25 +0300 +Subject: selftests: forwarding: fix learning_test when h1 supports + IFF_UNICAST_FLT + +From: Vladimir Oltean + +[ Upstream commit 1a635d3e1c80626237fdae47a5545b6655d8d81c ] + +The first host interface has by default no interest in receiving packets +MAC DA de:ad:be:ef:13:37, so it might drop them before they hit the tc +filter and this might confuse the selftest. + +Enable promiscuous mode such that the filter properly counts received +packets. + +Fixes: d4deb01467ec ("selftests: forwarding: Add a test for FDB learning") +Signed-off-by: Vladimir Oltean +Reviewed-by: Ido Schimmel +Tested-by: Ido Schimmel +Signed-off-by: Paolo Abeni +Signed-off-by: Sasha Levin +--- + tools/testing/selftests/net/forwarding/lib.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh +index 4d98e8940095..054f776c3843 100644 +--- a/tools/testing/selftests/net/forwarding/lib.sh ++++ b/tools/testing/selftests/net/forwarding/lib.sh +@@ -819,6 +819,7 @@ learning_test() + # FDB entry was installed. + bridge link set dev $br_port1 flood off + ++ ip link set $host1_if promisc on + tc qdisc add dev $host1_if ingress + tc filter add dev $host1_if ingress protocol ip pref 1 handle 101 \ + flower dst_mac $mac action drop +@@ -868,6 +869,7 @@ learning_test() + + tc filter del dev $host1_if ingress protocol ip pref 1 handle 101 flower + tc qdisc del dev $host1_if ingress ++ ip link set $host1_if promisc off + + bridge link set dev $br_port1 flood on + +-- +2.35.1 + diff --git a/queue-4.19/series b/queue-4.19/series index c45e8b883f2..e0ec996d0d7 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -13,3 +13,11 @@ can-kvaser_usb-replace-run-time-checks-with-struct-kvaser_usb_driver_info.patch can-kvaser_usb-kvaser_usb_leaf-fix-can-clock-frequency-regression.patch can-kvaser_usb-kvaser_usb_leaf-fix-bittiming-limits.patch xfs-remove-incorrect-assert-in-xfs_rename.patch +arm-meson-fix-refcount-leak-in-meson_smp_prepare_cpu.patch +pinctrl-sunxi-a83t-fix-nand-function-name-for-some-p.patch +arm-at91-pm-use-proper-compatible-for-sama5d2-s-rtc.patch +ibmvnic-properly-dispose-of-all-skbs-during-a-failov.patch +selftests-forwarding-fix-flood_unicast_test-when-h2-.patch +selftests-forwarding-fix-learning_test-when-h1-suppo.patch +selftests-forwarding-fix-error-message-in-learning_t.patch +i2c-cadence-unregister-the-clk-notifier-in-error-pat.patch -- 2.47.3