]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Aug 2024 12:09:55 +0000 (14:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Aug 2024 12:09:55 +0000 (14:09 +0200)
added patches:
cxgb4-add-forgotten-u64-ivlan-cast-before-shift.patch
mmc-dw_mmc-allow-biu-and-ciu-clocks-to-defer.patch

queue-5.4/cxgb4-add-forgotten-u64-ivlan-cast-before-shift.patch [new file with mode: 0644]
queue-5.4/mmc-dw_mmc-allow-biu-and-ciu-clocks-to-defer.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/cxgb4-add-forgotten-u64-ivlan-cast-before-shift.patch b/queue-5.4/cxgb4-add-forgotten-u64-ivlan-cast-before-shift.patch
new file mode 100644 (file)
index 0000000..2b1d52c
--- /dev/null
@@ -0,0 +1,38 @@
+From 80a1e7b83bb1834b5568a3872e64c05795d88f31 Mon Sep 17 00:00:00 2001
+From: Nikolay Kuratov <kniv@yandex-team.ru>
+Date: Mon, 19 Aug 2024 10:54:08 +0300
+Subject: cxgb4: add forgotten u64 ivlan cast before shift
+
+From: Nikolay Kuratov <kniv@yandex-team.ru>
+
+commit 80a1e7b83bb1834b5568a3872e64c05795d88f31 upstream.
+
+It is done everywhere in cxgb4 code, e.g. in is_filter_exact_match()
+There is no reason it should not be done here
+
+Found by Linux Verification Center (linuxtesting.org) with SVACE
+
+Signed-off-by: Nikolay Kuratov <kniv@yandex-team.ru>
+Cc: stable@vger.kernel.org
+Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters")
+Reviewed-by: Simon Horman <horms@kernel.org>
+Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
+Link: https://patch.msgid.link/20240819075408.92378-1-kniv@yandex-team.ru
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
++++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
+@@ -969,7 +969,8 @@ static u64 hash_filter_ntuple(struct ch_
+        * in the Compressed Filter Tuple.
+        */
+       if (tp->vlan_shift >= 0 && fs->mask.ivlan)
+-              ntuple |= (FT_VLAN_VLD_F | fs->val.ivlan) << tp->vlan_shift;
++              ntuple |= (u64)(FT_VLAN_VLD_F |
++                              fs->val.ivlan) << tp->vlan_shift;
+       if (tp->port_shift >= 0 && fs->mask.iport)
+               ntuple |= (u64)fs->val.iport << tp->port_shift;
diff --git a/queue-5.4/mmc-dw_mmc-allow-biu-and-ciu-clocks-to-defer.patch b/queue-5.4/mmc-dw_mmc-allow-biu-and-ciu-clocks-to-defer.patch
new file mode 100644 (file)
index 0000000..83abbe3
--- /dev/null
@@ -0,0 +1,47 @@
+From 6275c7bc8dd07644ea8142a1773d826800f0f3f7 Mon Sep 17 00:00:00 2001
+From: Ben Whitten <ben.whitten@gmail.com>
+Date: Sun, 11 Aug 2024 22:22:11 +0100
+Subject: mmc: dw_mmc: allow biu and ciu clocks to defer
+
+From: Ben Whitten <ben.whitten@gmail.com>
+
+commit 6275c7bc8dd07644ea8142a1773d826800f0f3f7 upstream.
+
+Fix a race condition if the clock provider comes up after mmc is probed,
+this causes mmc to fail without retrying.
+When given the DEFER error from the clk source, pass it on up the chain.
+
+Fixes: f90a0612f0e1 ("mmc: dw_mmc: lookup for optional biu and ciu clocks")
+Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/r/20240811212212.123255-1-ben.whitten@gmail.com
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/mmc/host/dw_mmc.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/drivers/mmc/host/dw_mmc.c
++++ b/drivers/mmc/host/dw_mmc.c
+@@ -3179,6 +3179,10 @@ int dw_mci_probe(struct dw_mci *host)
+       host->biu_clk = devm_clk_get(host->dev, "biu");
+       if (IS_ERR(host->biu_clk)) {
+               dev_dbg(host->dev, "biu clock not available\n");
++              ret = PTR_ERR(host->biu_clk);
++              if (ret == -EPROBE_DEFER)
++                      return ret;
++
+       } else {
+               ret = clk_prepare_enable(host->biu_clk);
+               if (ret) {
+@@ -3190,6 +3194,10 @@ int dw_mci_probe(struct dw_mci *host)
+       host->ciu_clk = devm_clk_get(host->dev, "ciu");
+       if (IS_ERR(host->ciu_clk)) {
+               dev_dbg(host->dev, "ciu clock not available\n");
++              ret = PTR_ERR(host->ciu_clk);
++              if (ret == -EPROBE_DEFER)
++                      goto err_clk_biu;
++
+               host->bus_hz = host->pdata->bus_hz;
+       } else {
+               ret = clk_prepare_enable(host->ciu_clk);
index f90f67ac8f0b44c675639f96a8699ba0e74a1af3..1e04969a67f27adef551a717abadeb427a9c94f3 100644 (file)
@@ -100,3 +100,5 @@ mmc-mmc_test-fix-null-dereference-on-allocation-fail.patch
 bluetooth-mgmt-add-error-handling-to-pair_device.patch
 hid-wacom-defer-calculation-of-resolution-until-resolution_code-is-known.patch
 hid-microsoft-add-rumble-support-to-latest-xbox-controllers.patch
+cxgb4-add-forgotten-u64-ivlan-cast-before-shift.patch
+mmc-dw_mmc-allow-biu-and-ciu-clocks-to-defer.patch