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

From: Can Guo
Date: Sat Jun 12 2021 - 02:48:29 EST


On 2021-06-12 05:00, Bart Van Assche wrote:
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?

Please kindly check my reply in patch #5.

Thanks,

Can Guo.


Thanks,

Bart.