[PATCH v1] scsi: ufs: core: add is_sys_suspended state before recovery

From: HOYOUNG SEO

Date: Fri Oct 23 2026 - 04:58:28 EST


If a linereset occurs during ufshcd_wl_resume and
a hibern8_exit fail occurs, recovery is performed redundantly
in both the err_handler and the __ufshcd_wl_resume function.
To prevent this redundant recovery, a check for the is_sys_suspended
state has been added to the err_handler.

Signed-off-by: HOYOUNG SEO <hy50.seo@xxxxxxxxxxx>
---
drivers/ufs/core/ufshcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index bcc2512bf34b..a164f23e8968 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -7042,7 +7042,7 @@ static void ufshcd_err_handler(struct work_struct *work)
* is already in progress.
*/
ufshcd_rpm_get_noresume(hba);
- if (hba->pm_op_in_progress) {
+ if (hba->pm_op_in_progress && !hba->is_sys_suspended) {
ufshcd_link_recovery(hba);
ufshcd_rpm_put(hba);
return;
--
2.34.1