]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Aug 2025 10:06:57 +0000 (12:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Aug 2025 10:06:57 +0000 (12:06 +0200)
added patches:
misc-rtsx-usb-ensure-mmc-child-device-is-active-when-card-is-present.patch

queue-5.4/drm-amdgpu-fix-incorrect-vm-flags-to-map-bo.patch
queue-5.4/misc-rtsx-usb-ensure-mmc-child-device-is-active-when-card-is-present.patch [new file with mode: 0644]
queue-5.4/series

index 815eaf3de7ac7872331cfe65f7c8b54f163321ce..9887f73e906781ff05af96d6d2e3db3c50d76eb9 100644 (file)
@@ -17,14 +17,12 @@ Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
 (cherry picked from commit b08425fa77ad2f305fe57a33dceb456be03b653f)
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 4 ++--
+ drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c
-index 35a8d3c96fc9..2e811e963e35 100644
 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c
 +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c
-@@ -94,8 +94,8 @@ int amdgpu_map_static_csa(struct amdgpu_device *adev, struct amdgpu_vm *vm,
+@@ -94,8 +94,8 @@ int amdgpu_map_static_csa(struct amdgpu_
        }
  
        r = amdgpu_vm_bo_map(adev, *bo_va, csa_addr, 0, size,
@@ -35,6 +33,3 @@ index 35a8d3c96fc9..2e811e963e35 100644
  
        if (r) {
                DRM_ERROR("failed to do bo_map on static CSA, err=%d\n", r);
--- 
-2.50.1
-
diff --git a/queue-5.4/misc-rtsx-usb-ensure-mmc-child-device-is-active-when-card-is-present.patch b/queue-5.4/misc-rtsx-usb-ensure-mmc-child-device-is-active-when-card-is-present.patch
new file mode 100644 (file)
index 0000000..39fa304
--- /dev/null
@@ -0,0 +1,69 @@
+From 966c5cd72be8989c8a559ddef8e8ff07a37c5eb0 Mon Sep 17 00:00:00 2001
+From: Ricky Wu <ricky_wu@realtek.com>
+Date: Fri, 11 Jul 2025 22:01:43 +0800
+Subject: misc: rtsx: usb: Ensure mmc child device is active when card is present
+
+From: Ricky Wu <ricky_wu@realtek.com>
+
+commit 966c5cd72be8989c8a559ddef8e8ff07a37c5eb0 upstream.
+
+When a card is present in the reader, the driver currently defers
+autosuspend by returning -EAGAIN during the suspend callback to
+trigger USB remote wakeup signaling. However, this does not guarantee
+that the mmc child device has been resumed, which may cause issues if
+it remains suspended while the card is accessible.
+This patch ensures that all child devices, including the mmc host
+controller, are explicitly resumed before returning -EAGAIN. This
+fixes a corner case introduced by earlier remote wakeup handling,
+improving reliability of runtime PM when a card is inserted.
+
+Fixes: 883a87ddf2f1 ("misc: rtsx_usb: Use USB remote wakeup signaling for card insertion detection")
+Cc: stable@vger.kernel.org
+Signed-off-by: Ricky Wu <ricky_wu@realtek.com>
+Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
+Link: https://lore.kernel.org/r/20250711140143.2105224-1-ricky_wu@realtek.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/misc/cardreader/rtsx_usb.c |   16 +++++++++-------
+ 1 file changed, 9 insertions(+), 7 deletions(-)
+
+--- a/drivers/misc/cardreader/rtsx_usb.c
++++ b/drivers/misc/cardreader/rtsx_usb.c
+@@ -698,6 +698,12 @@ static void rtsx_usb_disconnect(struct u
+ }
+ #ifdef CONFIG_PM
++static int rtsx_usb_resume_child(struct device *dev, void *data)
++{
++      pm_request_resume(dev);
++      return 0;
++}
++
+ static int rtsx_usb_suspend(struct usb_interface *intf, pm_message_t message)
+ {
+       struct rtsx_ucr *ucr =
+@@ -713,8 +719,10 @@ static int rtsx_usb_suspend(struct usb_i
+                       mutex_unlock(&ucr->dev_mutex);
+                       /* Defer the autosuspend if card exists */
+-                      if (val & (SD_CD | MS_CD))
++                      if (val & (SD_CD | MS_CD)) {
++                              device_for_each_child(&intf->dev, NULL, rtsx_usb_resume_child);
+                               return -EAGAIN;
++                      }
+               } else {
+                       /* There is an ongoing operation*/
+                       return -EAGAIN;
+@@ -724,12 +732,6 @@ static int rtsx_usb_suspend(struct usb_i
+       return 0;
+ }
+-static int rtsx_usb_resume_child(struct device *dev, void *data)
+-{
+-      pm_request_resume(dev);
+-      return 0;
+-}
+-
+ static int rtsx_usb_resume(struct usb_interface *intf)
+ {
+       device_for_each_child(&intf->dev, NULL, rtsx_usb_resume_child);
index 90d09ceb945a53d3462457613f1afa9dd8c8c9a5..0dacf2231a85c36e1c8580d616aaa02768943f9c 100644 (file)
@@ -272,3 +272,4 @@ pnfs-fix-uninited-ptr-deref-in-block-scsi-layout.patch
 rtc-ds1307-remove-clear-of-oscillator-stop-flag-osf-.patch
 scsi-lpfc-remove-redundant-assignment-to-avoid-memor.patch
 drm-amdgpu-fix-incorrect-vm-flags-to-map-bo.patch
+misc-rtsx-usb-ensure-mmc-child-device-is-active-when-card-is-present.patch