Re: [PATCH v4] scsi: ufs: core: handle PM commands timeout before SCSI EH
From: Bart Van Assche
Date: Tue Jun 02 2026 - 13:31:55 EST
On 6/2/26 5:41 AM, Hongjie Fang wrote:
- return scsi_host_busy(hba->host) ? SCSI_EH_RESET_TIMER : SCSI_EH_DONE;
+ /*
+ * ufshcd_link_recovery() may already have completed @scmd, e.g. via
+ * the existing MCQ force-completion path.
+ */
+ if (!test_bit(SCMD_STATE_COMPLETE, &scmd->state)) {
The above test can be left out if scsi_done() would be called before
ufshcd_link_recovery(), isn't it? Otherwise this patch looks good to me.
Thanks,
Bart.