]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 5.15
authorSasha Levin <sashal@kernel.org>
Fri, 1 Aug 2025 23:48:57 +0000 (19:48 -0400)
committerSasha Levin <sashal@kernel.org>
Fri, 1 Aug 2025 23:48:57 +0000 (19:48 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-5.15/asoc-intel-fix-snd_soc_sof-dependencies.patch [new file with mode: 0644]
queue-5.15/ethernet-intel-fix-building-with-large-nr_cpus.patch [new file with mode: 0644]
queue-5.15/series
queue-5.15/usb-chipidea-add-usb-phy-event.patch [new file with mode: 0644]
queue-5.15/usb-phy-mxs-disconnect-line-when-usb-charger-is-atta.patch [new file with mode: 0644]

diff --git a/queue-5.15/asoc-intel-fix-snd_soc_sof-dependencies.patch b/queue-5.15/asoc-intel-fix-snd_soc_sof-dependencies.patch
new file mode 100644 (file)
index 0000000..dda6b2d
--- /dev/null
@@ -0,0 +1,64 @@
+From d5f2341d142d04768181da6dc94d8bae9b55ff68 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 9 Jul 2025 16:56:07 +0200
+Subject: ASoC: Intel: fix SND_SOC_SOF dependencies
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+[ Upstream commit e837b59f8b411b5baf5e3de7a5aea10b1c545a63 ]
+
+It is currently possible to configure a kernel with all Intel SoC
+configs as loadable modules, but the board config as built-in. This
+causes a link failure in the reference to the snd_soc_sof.ko module:
+
+x86_64-linux-ld: sound/soc/intel/boards/sof_rt5682.o: in function `sof_rt5682_hw_params':
+sof_rt5682.c:(.text+0x1f9): undefined reference to `sof_dai_get_mclk'
+x86_64-linux-ld: sof_rt5682.c:(.text+0x234): undefined reference to `sof_dai_get_bclk'
+x86_64-linux-ld: sound/soc/intel/boards/sof_rt5682.o: in function `sof_rt5682_codec_init':
+sof_rt5682.c:(.text+0x3e0): undefined reference to `sof_dai_get_mclk'
+x86_64-linux-ld: sound/soc/intel/boards/sof_cs42l42.o: in function `sof_cs42l42_hw_params':
+sof_cs42l42.c:(.text+0x2a): undefined reference to `sof_dai_get_bclk'
+x86_64-linux-ld: sound/soc/intel/boards/sof_nau8825.o: in function `sof_nau8825_hw_params':
+sof_nau8825.c:(.text+0x7f): undefined reference to `sof_dai_get_bclk'
+x86_64-linux-ld: sound/soc/intel/boards/sof_da7219.o: in function `da7219_codec_init':
+sof_da7219.c:(.text+0xbf): undefined reference to `sof_dai_get_mclk'
+x86_64-linux-ld: sound/soc/intel/boards/sof_maxim_common.o: in function `max_98373_hw_params':
+sof_maxim_common.c:(.text+0x6f9): undefined reference to `sof_dai_get_tdm_slots'
+x86_64-linux-ld: sound/soc/intel/boards/sof_realtek_common.o: in function `rt1015_hw_params':
+sof_realtek_common.c:(.text+0x54c): undefined reference to `sof_dai_get_bclk'
+x86_64-linux-ld: sound/soc/intel/boards/sof_realtek_common.o: in function `rt1308_hw_params':
+sof_realtek_common.c:(.text+0x702): undefined reference to `sof_dai_get_mclk'
+x86_64-linux-ld: sound/soc/intel/boards/sof_cirrus_common.o: in function `cs35l41_hw_params':
+sof_cirrus_common.c:(.text+0x2f): undefined reference to `sof_dai_get_bclk'
+
+Add an optional dependency on SND_SOC_SOF_INTEL_COMMON, to ensure that whenever
+the SOF support is in a loadable module, none of the board code can be built-in.
+
+This may be be a little heavy-handed, but I also don't see a reason why one would
+want the boards to be built-in but not the SoC, so it shouldn't actually cause
+any usability problems.
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Link: https://patch.msgid.link/20250709145626.64125-1-arnd@kernel.org
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/intel/boards/Kconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig
+index 61b71d6c44cf..960a1bd79489 100644
+--- a/sound/soc/intel/boards/Kconfig
++++ b/sound/soc/intel/boards/Kconfig
+@@ -11,7 +11,7 @@ menuconfig SND_SOC_INTEL_MACH
+        kernel: saying N will just cause the configurator to skip all
+        the questions about Intel ASoC machine drivers.
+-if SND_SOC_INTEL_MACH
++if SND_SOC_INTEL_MACH && (SND_SOC_SOF_INTEL_COMMON || !SND_SOC_SOF_INTEL_COMMON)
+ config SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES
+       bool "Use more user friendly long card names"
+-- 
+2.39.5
+
diff --git a/queue-5.15/ethernet-intel-fix-building-with-large-nr_cpus.patch b/queue-5.15/ethernet-intel-fix-building-with-large-nr_cpus.patch
new file mode 100644 (file)
index 0000000..1648afa
--- /dev/null
@@ -0,0 +1,100 @@
+From 57b512b765e878f71b48891eded44c3fd5978942 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 20 Jun 2025 19:31:24 +0200
+Subject: ethernet: intel: fix building with large NR_CPUS
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+[ Upstream commit 24171a5a4a952c26568ff0d2a0bc8c4708a95e1d ]
+
+With large values of CONFIG_NR_CPUS, three Intel ethernet drivers fail to
+compile like:
+
+In function ‘i40e_free_q_vector’,
+    inlined from ‘i40e_vsi_alloc_q_vectors’ at drivers/net/ethernet/intel/i40e/i40e_main.c:12112:3:
+  571 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
+include/linux/rcupdate.h:1084:17: note: in expansion of macro ‘BUILD_BUG_ON’
+ 1084 |                 BUILD_BUG_ON(offsetof(typeof(*(ptr)), rhf) >= 4096);    \
+drivers/net/ethernet/intel/i40e/i40e_main.c:5113:9: note: in expansion of macro ‘kfree_rcu’
+ 5113 |         kfree_rcu(q_vector, rcu);
+      |         ^~~~~~~~~
+
+The problem is that the 'rcu' member in 'q_vector' is too far from the start
+of the structure. Move this member before the CPU mask instead, in all three
+drivers.
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Acked-by: David S. Miller <davem@davemloft.net>
+Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
+Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
+Tested-by: Sunitha Mekala <sunithax.d.mekala@intel.com> (A Contingent worker at Intel)
+Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/intel/fm10k/fm10k.h | 3 ++-
+ drivers/net/ethernet/intel/i40e/i40e.h   | 2 +-
+ drivers/net/ethernet/intel/ixgbe/ixgbe.h | 3 ++-
+ 3 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/ethernet/intel/fm10k/fm10k.h b/drivers/net/ethernet/intel/fm10k/fm10k.h
+index 6119a4108838..65a2816142d9 100644
+--- a/drivers/net/ethernet/intel/fm10k/fm10k.h
++++ b/drivers/net/ethernet/intel/fm10k/fm10k.h
+@@ -189,13 +189,14 @@ struct fm10k_q_vector {
+       struct fm10k_ring_container rx, tx;
+       struct napi_struct napi;
++      struct rcu_head rcu;    /* to avoid race with update stats on free */
++
+       cpumask_t affinity_mask;
+       char name[IFNAMSIZ + 9];
+ #ifdef CONFIG_DEBUG_FS
+       struct dentry *dbg_q_vector;
+ #endif /* CONFIG_DEBUG_FS */
+-      struct rcu_head rcu;    /* to avoid race with update stats on free */
+       /* for dynamic allocation of rings associated with this q_vector */
+       struct fm10k_ring ring[] ____cacheline_internodealigned_in_smp;
+diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
+index a143440f3db6..223d5831a5bb 100644
+--- a/drivers/net/ethernet/intel/i40e/i40e.h
++++ b/drivers/net/ethernet/intel/i40e/i40e.h
+@@ -961,6 +961,7 @@ struct i40e_q_vector {
+       u16 reg_idx;            /* register index of the interrupt */
+       struct napi_struct napi;
++      struct rcu_head rcu;    /* to avoid race with update stats on free */
+       struct i40e_ring_container rx;
+       struct i40e_ring_container tx;
+@@ -971,7 +972,6 @@ struct i40e_q_vector {
+       cpumask_t affinity_mask;
+       struct irq_affinity_notify affinity_notify;
+-      struct rcu_head rcu;    /* to avoid race with update stats on free */
+       char name[I40E_INT_NAME_STR_LEN];
+       bool arm_wb_state;
+       bool in_busy_poll;
+diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+index 737590a0d849..09f7a3787f27 100644
+--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
++++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+@@ -458,9 +458,10 @@ struct ixgbe_q_vector {
+       struct ixgbe_ring_container rx, tx;
+       struct napi_struct napi;
++      struct rcu_head rcu;    /* to avoid race with update stats on free */
++
+       cpumask_t affinity_mask;
+       int numa_node;
+-      struct rcu_head rcu;    /* to avoid race with update stats on free */
+       char name[IFNAMSIZ + 9];
+       /* for dynamic allocation of rings associated with this q_vector */
+-- 
+2.39.5
+
index 5788ca2b7ab731c91061673793f0bc4343c50567..36e2bdf1947c9f2b6e0206decce7d3d689af5871 100644 (file)
@@ -104,3 +104,7 @@ x86-bugs-fix-use-of-possibly-uninit-value-in-amd_check_tsa_microcode.patch
 jfs-reject-on-disk-inodes-of-an-unsupported-type.patch
 comedi-comedi_test-fix-possible-deletion-of-uninitialized-timers.patch
 alsa-hda-add-missing-nvidia-hda-codec-ids.patch
+usb-chipidea-add-usb-phy-event.patch
+usb-phy-mxs-disconnect-line-when-usb-charger-is-atta.patch
+ethernet-intel-fix-building-with-large-nr_cpus.patch
+asoc-intel-fix-snd_soc_sof-dependencies.patch
diff --git a/queue-5.15/usb-chipidea-add-usb-phy-event.patch b/queue-5.15/usb-chipidea-add-usb-phy-event.patch
new file mode 100644 (file)
index 0000000..e8f02ce
--- /dev/null
@@ -0,0 +1,95 @@
+From eb2374f9e62e356b210fb3c1341ef383cdb37369 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 27 Jun 2023 19:03:51 +0800
+Subject: usb: chipidea: add USB PHY event
+
+From: Xu Yang <xu.yang_2@nxp.com>
+
+[ Upstream commit b7a62611fab72e585c729a7fcf666aa9c4144214 ]
+
+Add USB PHY event for below situation:
+- usb role changed
+- vbus connect
+- vbus disconnect
+- gadget driver is enumerated
+
+USB PHY driver can get the last event after above situation occurs
+and deal with different situations.
+
+Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
+Acked-by: Peter Chen <peter.chen@kernel.org>
+Link: https://lore.kernel.org/r/20230627110353.1879477-1-xu.yang_2@nxp.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/usb/chipidea/ci.h  | 18 ++++++++++++++++--
+ drivers/usb/chipidea/udc.c | 10 ++++++++++
+ 2 files changed, 26 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h
+index 50e37846f037..2615afd76561 100644
+--- a/drivers/usb/chipidea/ci.h
++++ b/drivers/usb/chipidea/ci.h
+@@ -276,8 +276,19 @@ static inline int ci_role_start(struct ci_hdrc *ci, enum ci_role role)
+               return -ENXIO;
+       ret = ci->roles[role]->start(ci);
+-      if (!ret)
+-              ci->role = role;
++      if (ret)
++              return ret;
++
++      ci->role = role;
++
++      if (ci->usb_phy) {
++              if (role == CI_ROLE_HOST)
++                      usb_phy_set_event(ci->usb_phy, USB_EVENT_ID);
++              else
++                      /* in device mode but vbus is invalid*/
++                      usb_phy_set_event(ci->usb_phy, USB_EVENT_NONE);
++      }
++
+       return ret;
+ }
+@@ -291,6 +302,9 @@ static inline void ci_role_stop(struct ci_hdrc *ci)
+       ci->role = CI_ROLE_END;
+       ci->roles[role]->stop(ci);
++
++      if (ci->usb_phy)
++              usb_phy_set_event(ci->usb_phy, USB_EVENT_NONE);
+ }
+ static inline enum usb_role ci_role_to_usb_role(struct ci_hdrc *ci)
+diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
+index 187c13af4b35..386019484ede 100644
+--- a/drivers/usb/chipidea/udc.c
++++ b/drivers/usb/chipidea/udc.c
+@@ -1703,6 +1703,13 @@ static int ci_udc_vbus_session(struct usb_gadget *_gadget, int is_active)
+               ret = ci->platdata->notify_event(ci,
+                               CI_HDRC_CONTROLLER_VBUS_EVENT);
++      if (ci->usb_phy) {
++              if (is_active)
++                      usb_phy_set_event(ci->usb_phy, USB_EVENT_VBUS);
++              else
++                      usb_phy_set_event(ci->usb_phy, USB_EVENT_NONE);
++      }
++
+       if (ci->driver)
+               ci_hdrc_gadget_connect(_gadget, is_active);
+@@ -2018,6 +2025,9 @@ static irqreturn_t udc_irq(struct ci_hdrc *ci)
+               if (USBi_PCI & intr) {
+                       ci->gadget.speed = hw_port_is_high_speed(ci) ?
+                               USB_SPEED_HIGH : USB_SPEED_FULL;
++                      if (ci->usb_phy)
++                              usb_phy_set_event(ci->usb_phy,
++                                      USB_EVENT_ENUMERATED);
+                       if (ci->suspended) {
+                               if (ci->driver->resume) {
+                                       spin_unlock(&ci->lock);
+-- 
+2.39.5
+
diff --git a/queue-5.15/usb-phy-mxs-disconnect-line-when-usb-charger-is-atta.patch b/queue-5.15/usb-phy-mxs-disconnect-line-when-usb-charger-is-atta.patch
new file mode 100644 (file)
index 0000000..f68cca8
--- /dev/null
@@ -0,0 +1,48 @@
+From 8c50c69bb0af52ce90566a75eff2b192b2259cd8 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 27 Jun 2023 19:03:53 +0800
+Subject: usb: phy: mxs: disconnect line when USB charger is attached
+
+From: Xu Yang <xu.yang_2@nxp.com>
+
+[ Upstream commit 87ed257acb0934e08644568df6495988631afd4c ]
+
+For mxs PHY, if there is a vbus but the bus is not enumerated, we need
+to force the dp/dm as SE0 from the controller side. If not, there is
+possible USB wakeup due to unstable dp/dm, since there is possible no
+pull on dp/dm, such as there is a USB charger on the port.
+
+Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
+Acked-by: Peter Chen <peter.chen@kernel.org>
+Link: https://lore.kernel.org/r/20230627110353.1879477-3-xu.yang_2@nxp.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/usb/phy/phy-mxs-usb.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c
+index 19b54c1cb779..404da4615611 100644
+--- a/drivers/usb/phy/phy-mxs-usb.c
++++ b/drivers/usb/phy/phy-mxs-usb.c
+@@ -394,6 +394,7 @@ static bool mxs_phy_is_otg_host(struct mxs_phy *mxs_phy)
+ static void mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool on)
+ {
+       bool vbus_is_on = false;
++      enum usb_phy_events last_event = mxs_phy->phy.last_event;
+       /* If the SoCs don't need to disconnect line without vbus, quit */
+       if (!(mxs_phy->data->flags & MXS_PHY_DISCONNECT_LINE_WITHOUT_VBUS))
+@@ -405,7 +406,8 @@ static void mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool on)
+       vbus_is_on = mxs_phy_get_vbus_status(mxs_phy);
+-      if (on && !vbus_is_on && !mxs_phy_is_otg_host(mxs_phy))
++      if (on && ((!vbus_is_on && !mxs_phy_is_otg_host(mxs_phy))
++              || (last_event == USB_EVENT_VBUS)))
+               __mxs_phy_disconnect_line(mxs_phy, true);
+       else
+               __mxs_phy_disconnect_line(mxs_phy, false);
+-- 
+2.39.5
+