Re: [PATCH v3] scsi: ufs: core: handle PM SSU timeout before SCSI EH
From: Peter Wang (王信友)
Date: Mon Jun 01 2026 - 06:34:50 EST
On Mon, 2026-06-01 at 12:56 +0800, Hongjie Fang wrote:
> @@ -6517,6 +6548,8 @@ static void ufshcd_complete_requests(struct
> ufs_hba *hba, bool force_compl)
> {
> if (hba->mcq_enabled)
> ufshcd_mcq_compl_pending_transfer(hba, force_compl);
> + else if (force_compl)
> + ufshcd_force_compl_pending_transfer(hba);
>
Hi Hongjie,
Why will an SSU timeout invoke ufshcd_complete_requests
if SCSI_EH_DONE is returned in ufshcd_eh_timed_out?
> else
> ufshcd_transfer_req_compl(hba);
>
> @@ -9466,7 +9499,7 @@ static enum scsi_timeout_action
> ufshcd_eh_timed_out(struct scsi_cmnd *scmd)
> {
> struct ufs_hba *hba = shost_priv(scmd->device->host);
>
> - if (!hba->system_suspending) {
> + if (!hba->pm_op_in_progress || !ufshcd_is_scsi_cmd(scmd)) {
>
UFS internal device-management command timeouts will never
reach ufshcd_eh_timed_out, right?
Thanks
Peter