scsi: ufs: core: Decouple CQ sweep from request iterator in MCQ
Quoted 6 lines · Bart Van Assche
A correction: the
INIT_LIST_HEAD(&cmd->eh_entry)statement is not reached while SCSI host recovery is in progress becauseSCMD_STATE_COMPLETEis set for all pending commands before the SCSI host recovery starts.scsi_done()skips SCSI commands for which that bit is set due to the following code:
Quoted 8 lines
if (unlikely(test_and_set_bit(SCMD_STATE_COMPLETE, &cmd-
Quoted 1 line
state)))
return;
Hence, the
scmd->resultvalue is ignored ifscsi_done()is called while SCSI host recovery is in progress.Bart.
Thanks to Bart and Stanley for the detailed explanation. It is clear to me now.
Thanks
Peter