Skip to content

Commit ce9e7bc

Browse files
Stanley Chumartinkpetersen
authored andcommitted
scsi: ufs: Fix system suspend status
hba->is_sys_suspended is set after successful system suspend but not clear after successful system resume. According to current behavior, hba->is_sys_suspended will not be set if host is runtime-suspended but not system-suspended. Thus we shall aligh the same policy: clear this flag even if host remains runtime-suspended after ufshcd_system_resume is successfully returned. Simply fix this flag to correct host status logs. Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent f0783d4 commit ce9e7bc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/scsi/ufs/ufshcd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8001,6 +8001,8 @@ int ufshcd_system_resume(struct ufs_hba *hba)
80018001
trace_ufshcd_system_resume(dev_name(hba->dev), ret,
80028002
ktime_to_us(ktime_sub(ktime_get(), start)),
80038003
hba->curr_dev_pwr_mode, hba->uic_link_state);
8004+
if (!ret)
8005+
hba->is_sys_suspended = false;
80048006
return ret;
80058007
}
80068008
EXPORT_SYMBOL(ufshcd_system_resume);

0 commit comments

Comments
 (0)