Lines Matching refs:scmd
15 [1-2] How do scmd's get completed?
16 [1-2-1] Completing a scmd w/ scsi_done
17 [1-2-2] Completing a scmd w/ timeout
36 Each SCSI command is represented with struct scsi_cmnd (== scmd). A
37 scmd has two list_head's to link itself into lists. The two are
38 scmd->list and scmd->eh_entry. The former is used for free list or
39 per-device allocated scmd list and not of much interest to this EH
41 otherwise stated scmds are always linked using scmd->eh_entry in this
45 1.2 How do scmd's get completed?
48 Once LLDD gets hold of a scmd, either the LLDD will complete the
53 1.2.1 Completing a scmd w/ scsi_done
62 looks at the scmd->result value and sense data to determine what to do
79 scmd is requeued to blk queue.
83 scsi_eh_scmd_add(scmd) is invoked for the command. See
87 1.2.2 Completing a scmd w/ timeout
99 retry and only allowed scmd->allowed + 1(!) times. Once the
112 3. scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD) is invoked for the
131 1. Links scmd->eh_entry to shost->eh_cmd_q
139 As can be seen above, once any scmd is added to shost->eh_cmd_q,
141 scmd to be issued from blk queue to the host; eventually, all scmds on
152 completed a scmd with error status, the LLDD and lower layers are
153 assumed to forget about the scmd at that point. However, if a scmd
155 about the scmd, which currently no LLDD does, the command is still
204 commands. A scmd is said to be recovered if the scmd is forgotten by
205 lower layers and lower layers are ready to process or fail the scmd
229 eh_work_q. If a recovery action succeeds for a scmd, recovered
232 Note that single recovery action on a scmd can recover multiple
240 timed-out scmds, SCSI EH ensures that LLDD forgets about a scmd
243 When a scmd is recovered, the scmd is moved from eh_work_q to EH
250 EH), REQ_FAILFAST is not set and ++scmd->retries is less than
251 scmd->allowed.
259 :ACTION: scsi_eh_scmd_add() is invoked for scmd
261 - add scmd to shost->eh_cmd_q
275 3. scmd recovered
277 :ACTION: scsi_eh_finish_cmd() is invoked to EH-finish scmd
294 - scmd is removed from eh_done_q and scmd->eh_entry is cleared
295 - if retry is necessary, scmd is requeued using
297 - otherwise, scsi_finish_command() is invoked for scmd
325 Note that if autosense is not supported, scmd->sense_buffer
326 contains invalid sense data when error-completing the scmd
328 FAILED in such cases thus invoking SCSI EH. When the scmd
334 causes higher-severity recovery to be taken for the scmd.
336 2. Invoke scsi_decide_disposition() on the scmd
339 scmd->retries is set to scmd->allowed preventing
340 scsi_eh_flush_done_q() from retrying the scmd and
355 hostt->eh_abort_handler() is invoked for each scmd. The
357 all related hardware forget about the scmd.
359 If a timedout scmd is successfully aborted and the sdev is
361 the scmd. Otherwise, the scmd is left in eh_work_q for
370 TEST_UNIT_READY command. Note that the scmd must have been
388 that lower layers have forgotten about the scmd and we can
401 a sdev has no timed out scmd.
464 - Each failed scmd's eh_flags field is set appropriately.
466 - Each failed scmd is linked on scmd->eh_cmd_q by scmd->eh_entry.
480 - Each scmd is in such a state that scsi_setup_cmd_retry() on the
481 scmd doesn't make any difference.
485 - Each scmd->eh_entry is cleared.
488 each scmd. Note that the handler is free to use scmd->retries and