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
107 issue a retry scmd->allowed + 1 times. Asynchronous aborts are not invoked
113 3. scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD) is invoked for the
132 1. Links scmd->eh_entry to shost->eh_cmd_q
140 As can be seen above, once any scmd is added to shost->eh_cmd_q,
142 scmd to be issued from blk queue to the host; eventually, all scmds on
153 completed a scmd with error status, the LLDD and lower layers are
154 assumed to forget about the scmd at that point. However, if a scmd
156 about the scmd, which currently no LLDD does, the command is still
205 commands. A scmd is said to be recovered if the scmd is forgotten by
206 lower layers and lower layers are ready to process or fail the scmd
230 eh_work_q. If a recovery action succeeds for a scmd, recovered
233 Note that single recovery action on a scmd can recover multiple
241 timed-out scmds, SCSI EH ensures that LLDD forgets about a scmd
244 When a scmd is recovered, the scmd is moved from eh_work_q to EH
251 EH), REQ_FAILFAST is not set and ++scmd->retries is less than
252 scmd->allowed.
260 :ACTION: scsi_eh_scmd_add() is invoked for scmd
262 - add scmd to shost->eh_cmd_q
276 3. scmd recovered
278 :ACTION: scsi_eh_finish_cmd() is invoked to EH-finish scmd
295 - scmd is removed from eh_done_q and scmd->eh_entry is cleared
296 - if retry is necessary, scmd is requeued using
298 - otherwise, scsi_finish_command() is invoked for scmd
326 Note that if autosense is not supported, scmd->sense_buffer
327 contains invalid sense data when error-completing the scmd
329 FAILED in such cases thus invoking SCSI EH. When the scmd
335 causes higher-severity recovery to be taken for the scmd.
337 2. Invoke scsi_decide_disposition() on the scmd
340 scmd->retries is set to scmd->allowed preventing
341 scsi_eh_flush_done_q() from retrying the scmd and
356 hostt->eh_abort_handler() is invoked for each scmd. The
358 all related hardware forget about the scmd.
360 If a timedout scmd is successfully aborted and the sdev is
362 the scmd. Otherwise, the scmd is left in eh_work_q for
371 TEST_UNIT_READY command. Note that the scmd must have been
389 that lower layers have forgotten about the scmd and we can
402 a sdev has no timed out scmd.
465 - Each failed scmd's eh_flags field is set appropriately.
467 - Each failed scmd is linked on scmd->eh_cmd_q by scmd->eh_entry.
481 - Each scmd is in such a state that scsi_setup_cmd_retry() on the
482 scmd doesn't make any difference.
486 - Each scmd->eh_entry is cleared.
489 each scmd. Note that the handler is free to use scmd->retries and