Skip to contentSkip to conversation

scsi: ufs: core: Decouple CQ sweep from request iterator in MCQ

PATCH Peter Wang (王信友) 1 participant 1 message Sep 30 SCSI

lore
Share & tools
lore
#0 lore raw
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 because SCMD_STATE_COMPLETE is 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->result value is ignored if scsi_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