Re: [PATCH v3 7/9] scsi: ufs: Let host_sem cover the entire system suspend/resume

From: Bart Van Assche
Date: Fri Jun 11 2021 - 17:00:31 EST


On 6/9/21 9:43 PM, Can Guo wrote:
> UFS error handling now is doing more than just re-probing, but also sending
> scsi cmds, e.g., for clearing UACs, and recovering runtime PM error, which
> may change runtime status of scsi devices. To protect system suspend/resume
> from being disturbed by error handling, move the host_sem from wl pm ops
> to ufshcd_suspend_prepare() and ufshcd_resume_complete().

If lock_system_sleep() and unlock_system_sleep() would be used in the
error handler, would that allow to remove host_sem?

Thanks,

Bart.