[PATCH] scsi: ufs: core: cancel RTC work in active-active suspend

From: Guangshuo Li

Date: Wed Jul 08 2026 - 08:52:21 EST


UFS RTC support schedules ufs_rtc_update_work to periodically update the
device RTC. The work can issue query commands and access the UFS host
controller.

__ufshcd_wl_suspend() cancels ufs_rtc_update_work in the common suspend
path before calling the vendor suspend callback. However, the
active-active path, where both the device power mode and link state stay
active, jumps directly to vops_suspend after flushing exception handling
work. That jump bypasses the RTC work cancellation.

If the RTC work runs while the vendor suspend callback is gating or
otherwise changing hardware state, it can access the controller during
suspend and trigger an SError.

Cancel the RTC work in the active-active path before jumping to
vops_suspend, matching the common suspend path.

Fixes: 6bf999e0eb41 ("scsi: ufs: core: Add UFS RTC support")
Signed-off-by: Guangshuo Li <lgs201920130244@xxxxxxxxx>
---
drivers/ufs/core/ufshcd.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index d3044a3089b5..9d5571a7aec2 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -10269,6 +10269,7 @@ static int __ufshcd_wl_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
req_link_state == UIC_LINK_ACTIVE_STATE) {
ufshcd_disable_auto_bkops(hba);
flush_work(&hba->eeh_work);
+ cancel_delayed_work_sync(&hba->ufs_rtc_update_work);
goto vops_suspend;
}

--
2.43.0