]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Jun 2025 08:21:12 +0000 (10:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Jun 2025 08:21:12 +0000 (10:21 +0200)
added patches:
arm-9447-1-arm-memremap-fix-arch_memremap_can_ram_remap.patch
arm-omap-pmic-cpcap-do-not-mess-around-without-cpcap-or-omap4.patch
ata-pata_via-force-pio-for-atapi-devices-on-vt6415-vt6330.patch
bus-fsl-mc-do-not-add-a-device-link-for-the-uapi-used-dpmcp-device.patch
bus-mhi-host-fix-conflict-between-power_up-and-syserr.patch

queue-5.10/arm-9447-1-arm-memremap-fix-arch_memremap_can_ram_remap.patch [new file with mode: 0644]
queue-5.10/arm-omap-pmic-cpcap-do-not-mess-around-without-cpcap-or-omap4.patch [new file with mode: 0644]
queue-5.10/ata-pata_via-force-pio-for-atapi-devices-on-vt6415-vt6330.patch [new file with mode: 0644]
queue-5.10/bus-fsl-mc-do-not-add-a-device-link-for-the-uapi-used-dpmcp-device.patch [new file with mode: 0644]
queue-5.10/bus-mhi-host-fix-conflict-between-power_up-and-syserr.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/arm-9447-1-arm-memremap-fix-arch_memremap_can_ram_remap.patch b/queue-5.10/arm-9447-1-arm-memremap-fix-arch_memremap_can_ram_remap.patch
new file mode 100644 (file)
index 0000000..90d44aa
--- /dev/null
@@ -0,0 +1,48 @@
+From 96e0b355883006554a0bee3697da475971d6bba8 Mon Sep 17 00:00:00 2001
+From: Ross Stutterheim <ross.stutterheim@garmin.com>
+Date: Wed, 16 Apr 2025 14:50:06 +0100
+Subject: ARM: 9447/1: arm/memremap: fix arch_memremap_can_ram_remap()
+
+From: Ross Stutterheim <ross.stutterheim@garmin.com>
+
+commit 96e0b355883006554a0bee3697da475971d6bba8 upstream.
+
+arm/memremap: fix arch_memremap_can_ram_remap()
+
+commit 260364d112bc ("arm[64]/memremap: don't abuse pfn_valid() to ensure
+presence of linear map") added the definition of
+arch_memremap_can_ram_remap() for arm[64] specific filtering of what pages
+can be used from the linear mapping. memblock_is_map_memory() was called
+with the pfn of the address given to arch_memremap_can_ram_remap();
+however, memblock_is_map_memory() expects to be given an address for arm,
+not a pfn.
+
+This results in calls to memremap() returning a newly mapped area when
+it should return an address in the existing linear mapping.
+
+Fix this by removing the address to pfn translation and pass the
+address directly.
+
+Fixes: 260364d112bc ("arm[64]/memremap: don't abuse pfn_valid() to ensure presence of linear map")
+Signed-off-by: Ross Stutterheim <ross.stutterheim@garmin.com>
+Cc: Mike Rapoport <rppt@kernel.org>
+Cc: stable@vger.kernel.org
+Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm/mm/ioremap.c |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/arch/arm/mm/ioremap.c
++++ b/arch/arm/mm/ioremap.c
+@@ -483,7 +483,5 @@ void __init early_ioremap_init(void)
+ bool arch_memremap_can_ram_remap(resource_size_t offset, size_t size,
+                                unsigned long flags)
+ {
+-      unsigned long pfn = PHYS_PFN(offset);
+-
+-      return memblock_is_map_memory(pfn);
++      return memblock_is_map_memory(offset);
+ }
diff --git a/queue-5.10/arm-omap-pmic-cpcap-do-not-mess-around-without-cpcap-or-omap4.patch b/queue-5.10/arm-omap-pmic-cpcap-do-not-mess-around-without-cpcap-or-omap4.patch
new file mode 100644 (file)
index 0000000..925bd77
--- /dev/null
@@ -0,0 +1,44 @@
+From 7397daf1029d5bfd3415ec8622f5179603d5702d Mon Sep 17 00:00:00 2001
+From: Andreas Kemnade <andreas@kemnade.info>
+Date: Mon, 31 Mar 2025 16:44:39 +0200
+Subject: ARM: omap: pmic-cpcap: do not mess around without CPCAP or OMAP4
+
+From: Andreas Kemnade <andreas@kemnade.info>
+
+commit 7397daf1029d5bfd3415ec8622f5179603d5702d upstream.
+
+The late init call just writes to omap4 registers as soon as
+CONFIG_MFD_CPCAP is enabled without checking whether the
+cpcap driver is actually there or the SoC is indeed an
+OMAP4.
+Rather do these things only with the right device combination.
+
+Fixes booting the BT200 with said configuration enabled and non-factory
+X-Loader and probably also some surprising behavior on other devices.
+
+Fixes: c145649bf262 ("ARM: OMAP2+: Configure voltage controller for cpcap to low-speed")
+CC: stable@vger.kernel.org
+Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
+Reivewed-by: Tony Lindgren <tony@atomide.com>
+Link: https://lore.kernel.org/r/20250331144439.769697-1-andreas@kemnade.info
+Signed-off-by: Kevin Hilman <khilman@baylibre.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm/mach-omap2/pmic-cpcap.c |    6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/arch/arm/mach-omap2/pmic-cpcap.c
++++ b/arch/arm/mach-omap2/pmic-cpcap.c
+@@ -264,7 +264,11 @@ int __init omap4_cpcap_init(void)
+ static int __init cpcap_late_init(void)
+ {
+-      omap4_vc_set_pmic_signaling(PWRDM_POWER_RET);
++      if (!of_find_compatible_node(NULL, NULL, "motorola,cpcap"))
++              return 0;
++
++      if (soc_is_omap443x() || soc_is_omap446x() || soc_is_omap447x())
++              omap4_vc_set_pmic_signaling(PWRDM_POWER_RET);
+       return 0;
+ }
diff --git a/queue-5.10/ata-pata_via-force-pio-for-atapi-devices-on-vt6415-vt6330.patch b/queue-5.10/ata-pata_via-force-pio-for-atapi-devices-on-vt6415-vt6330.patch
new file mode 100644 (file)
index 0000000..812b3d4
--- /dev/null
@@ -0,0 +1,48 @@
+From d29fc02caad7f94b62d56ee1b01c954f9c961ba7 Mon Sep 17 00:00:00 2001
+From: Tasos Sahanidis <tasos@tasossah.com>
+Date: Mon, 19 May 2025 11:49:45 +0300
+Subject: ata: pata_via: Force PIO for ATAPI devices on VT6415/VT6330
+
+From: Tasos Sahanidis <tasos@tasossah.com>
+
+commit d29fc02caad7f94b62d56ee1b01c954f9c961ba7 upstream.
+
+The controller has a hardware bug that can hard hang the system when
+doing ATAPI DMAs without any trace of what happened. Depending on the
+device attached, it can also prevent the system from booting.
+
+In this case, the system hangs when reading the ATIP from optical media
+with cdrecord -vvv -atip on an _NEC DVD_RW ND-4571A 1-01 and an
+Optiarc DVD RW AD-7200A 1.06 attached to an ASRock 990FX Extreme 4,
+running at UDMA/33.
+
+The issue can be reproduced by running the same command with a cygwin
+build of cdrecord on WinXP, although it requires more attempts to cause
+it. The hang in that case is also resolved by forcing PIO. It doesn't
+appear that VIA has produced any drivers for that OS, thus no known
+workaround exists.
+
+HDDs attached to the controller do not suffer from any DMA issues.
+
+Cc: stable@vger.kernel.org
+Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/916677
+Signed-off-by: Tasos Sahanidis <tasos@tasossah.com>
+Link: https://lore.kernel.org/r/20250519085508.1398701-1-tasos@tasossah.com
+Signed-off-by: Niklas Cassel <cassel@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/ata/pata_via.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/ata/pata_via.c
++++ b/drivers/ata/pata_via.c
+@@ -368,7 +368,8 @@ static unsigned long via_mode_filter(str
+       }
+       if (dev->class == ATA_DEV_ATAPI &&
+-          dmi_check_system(no_atapi_dma_dmi_table)) {
++          (dmi_check_system(no_atapi_dma_dmi_table) ||
++           config->id == PCI_DEVICE_ID_VIA_6415)) {
+               ata_dev_warn(dev, "controller locks up on ATAPI DMA, forcing PIO\n");
+               mask &= ATA_MASK_PIO;
+       }
diff --git a/queue-5.10/bus-fsl-mc-do-not-add-a-device-link-for-the-uapi-used-dpmcp-device.patch b/queue-5.10/bus-fsl-mc-do-not-add-a-device-link-for-the-uapi-used-dpmcp-device.patch
new file mode 100644 (file)
index 0000000..5fbd1a2
--- /dev/null
@@ -0,0 +1,60 @@
+From dd7d8e012b23de158ca0188239c7a1f2a83b4484 Mon Sep 17 00:00:00 2001
+From: Ioana Ciornei <ioana.ciornei@nxp.com>
+Date: Tue, 8 Apr 2025 13:58:10 +0300
+Subject: bus: fsl-mc: do not add a device-link for the UAPI used DPMCP device
+
+From: Ioana Ciornei <ioana.ciornei@nxp.com>
+
+commit dd7d8e012b23de158ca0188239c7a1f2a83b4484 upstream.
+
+The fsl-mc bus associated to the root DPRC in a DPAA2 system exports a
+device file for userspace access to the MC firmware. In case the DPRC's
+local MC portal (DPMCP) is currently in use, a new DPMCP device is
+allocated through the fsl_mc_portal_allocate() function.
+
+In this case, the call to fsl_mc_portal_allocate() will fail with -EINVAL
+when trying to add a device link between the root DPRC (consumer) and
+the newly allocated DPMCP device (supplier). This is because the DPMCP
+is a dependent of the DPRC device (the bus).
+
+Fix this by not adding a device link in case the DPMCP is allocated for
+the root DPRC's usage.
+
+Fixes: afb77422819f ("bus: fsl-mc: automatically add a device_link on fsl_mc_[portal,object]_allocate")
+Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/r/20250408105814.2837951-3-ioana.ciornei@nxp.com
+Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/bus/fsl-mc/mc-io.c |   19 +++++++++++++------
+ 1 file changed, 13 insertions(+), 6 deletions(-)
+
+--- a/drivers/bus/fsl-mc/mc-io.c
++++ b/drivers/bus/fsl-mc/mc-io.c
+@@ -214,12 +214,19 @@ int __must_check fsl_mc_portal_allocate(
+       if (error < 0)
+               goto error_cleanup_resource;
+-      dpmcp_dev->consumer_link = device_link_add(&mc_dev->dev,
+-                                                 &dpmcp_dev->dev,
+-                                                 DL_FLAG_AUTOREMOVE_CONSUMER);
+-      if (!dpmcp_dev->consumer_link) {
+-              error = -EINVAL;
+-              goto error_cleanup_mc_io;
++      /* If the DPRC device itself tries to allocate a portal (usually for
++       * UAPI interaction), don't add a device link between them since the
++       * DPMCP device is an actual child device of the DPRC and a reverse
++       * dependency is not allowed.
++       */
++      if (mc_dev != mc_bus_dev) {
++              dpmcp_dev->consumer_link = device_link_add(&mc_dev->dev,
++                                                         &dpmcp_dev->dev,
++                                                         DL_FLAG_AUTOREMOVE_CONSUMER);
++              if (!dpmcp_dev->consumer_link) {
++                      error = -EINVAL;
++                      goto error_cleanup_mc_io;
++              }
+       }
+       *new_mc_io = mc_io;
diff --git a/queue-5.10/bus-mhi-host-fix-conflict-between-power_up-and-syserr.patch b/queue-5.10/bus-mhi-host-fix-conflict-between-power_up-and-syserr.patch
new file mode 100644 (file)
index 0000000..f008547
--- /dev/null
@@ -0,0 +1,96 @@
+From 4d92e7c5ccadc79764674ffc2c88d329aabbb7e0 Mon Sep 17 00:00:00 2001
+From: Jeffrey Hugo <quic_jhugo@quicinc.com>
+Date: Fri, 28 Mar 2025 10:35:26 -0600
+Subject: bus: mhi: host: Fix conflict between power_up and SYSERR
+
+From: Jeff Hugo <quic_jhugo@quicinc.com>
+
+commit 4d92e7c5ccadc79764674ffc2c88d329aabbb7e0 upstream.
+
+When mhi_async_power_up() enables IRQs, it is possible that we could
+receive a SYSERR notification from the device if the firmware has crashed
+for some reason. Then the SYSERR notification queues a work item that
+cannot execute until the pm_mutex is released by mhi_async_power_up().
+
+So the SYSERR work item will be pending. If mhi_async_power_up() detects
+the SYSERR, it will handle it. If the device is in PBL, then the PBL state
+transition event will be queued, resulting in a work item after the
+pending SYSERR work item. Once mhi_async_power_up() releases the pm_mutex,
+the SYSERR work item can run. It will blindly attempt to reset the MHI
+state machine, which is the recovery action for SYSERR. PBL/SBL are not
+interrupt driven and will ignore the MHI Reset unless SYSERR is actively
+advertised. This will cause the SYSERR work item to timeout waiting for
+reset to be cleared, and will leave the host state in SYSERR processing.
+The PBL transition work item will then run, and immediately fail because
+SYSERR processing is not a valid state for PBL transition.
+
+This leaves the device uninitialized.
+
+This issue has a fairly unique signature in the kernel log:
+
+       mhi mhi3: Requested to power ON
+       Qualcomm Cloud AI 100 0000:36:00.0: Fatal error received from
+       device.  Attempting to recover
+       mhi mhi3: Power on setup success
+       mhi mhi3: Device failed to exit MHI Reset state
+       mhi mhi3: Device MHI is not in valid state
+
+We cannot remove the SYSERR handling from mhi_async_power_up() because the
+device may be in the SYSERR state, but we missed the notification as the
+irq was fired before irqs were enabled. We also can't queue the SYSERR work
+item from mhi_async_power_up() if SYSERR is detected because that may
+result in a duplicate work item, and cause the same issue since the
+duplicate item will blindly issue MHI reset even if SYSERR is no longer
+active.
+
+Instead, add a check in the SYSERR work item to make sure that MHI reset is
+only issued if the device is in SYSERR state for PBL or SBL EEs.
+
+Fixes: a6e2e3522f29 ("bus: mhi: core: Add support for PM state transitions")
+Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
+Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
+Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
+Reviewed-by: Troy Hanson <quic_thanson@quicinc.com>
+Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
+cc: stable@vger.kernel.org
+Link: https://patch.msgid.link/20250328163526.3365497-1-jeff.hugo@oss.qualcomm.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/bus/mhi/host/pm.c |   18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+--- a/drivers/bus/mhi/host/pm.c
++++ b/drivers/bus/mhi/host/pm.c
+@@ -454,6 +454,7 @@ static void mhi_pm_disable_transition(st
+       struct mhi_cmd *mhi_cmd;
+       struct mhi_event_ctxt *er_ctxt;
+       struct device *dev = &mhi_cntrl->mhi_dev->dev;
++      bool reset_device = false;
+       int ret, i;
+       dev_dbg(dev, "Transitioning from PM state: %s to: %s\n",
+@@ -485,8 +486,23 @@ static void mhi_pm_disable_transition(st
+               return;
+       }
+-      /* Trigger MHI RESET so that the device will not access host memory */
+       if (MHI_REG_ACCESS_VALID(prev_state)) {
++              /*
++               * If the device is in PBL or SBL, it will only respond to
++               * RESET if the device is in SYSERR state. SYSERR might
++               * already be cleared at this point.
++               */
++              enum mhi_state cur_state = mhi_get_mhi_state(mhi_cntrl);
++              enum mhi_ee_type cur_ee = mhi_get_exec_env(mhi_cntrl);
++
++              if (cur_state == MHI_STATE_SYS_ERR)
++                      reset_device = true;
++              else if (cur_ee != MHI_EE_PBL && cur_ee != MHI_EE_SBL)
++                      reset_device = true;
++      }
++
++      /* Trigger MHI RESET so that the device will not access host memory */
++      if (reset_device) {
+               u32 in_reset = -1;
+               unsigned long timeout = msecs_to_jiffies(mhi_cntrl->timeout_ms);
index 18b4915a04d1760fb921d3286680ccb7b373bb4f..b13f961be6d57afae84138e282073dcc1fa1bf79 100644 (file)
@@ -176,3 +176,8 @@ media-venus-fix-probe-error-handling.patch
 media-videobuf2-use-sgtable-based-scatterlist-wrappers.patch
 media-vidtv-terminating-the-subsequent-process-of-initialization-failure.patch
 media-vivid-change-the-siize-of-the-composing.patch
+arm-9447-1-arm-memremap-fix-arch_memremap_can_ram_remap.patch
+arm-omap-pmic-cpcap-do-not-mess-around-without-cpcap-or-omap4.patch
+bus-mhi-host-fix-conflict-between-power_up-and-syserr.patch
+ata-pata_via-force-pio-for-atapi-devices-on-vt6415-vt6330.patch
+bus-fsl-mc-do-not-add-a-device-link-for-the-uapi-used-dpmcp-device.patch