Lines Matching refs:scmd

13     [1-2] How do scmd's get completed?
14 [1-2-1] Completing a scmd w/ scsi_done
15 [1-2-2] Completing a scmd w/ timeout
32 Each SCSI command is represented with struct scsi_cmnd (== scmd). A
33 scmd has two list_head's to link itself into lists. The two are
34 scmd->list and scmd->eh_entry. The former is used for free list or
35 per-device allocated scmd list and not of much interest to this EH
37 otherwise stated scmds are always linked using scmd->eh_entry in this
41 [1-2] How do scmd's get completed?
43 Once LLDD gets hold of a scmd, either the LLDD will complete the
48 [1-2-1] Completing a scmd w/ scsi_done
56 looks at the scmd->result value and sense data to determine what to do
70 scmd is requeued to blk queue.
73 scsi_eh_scmd_add(scmd, 0) is invoked for the command. See
77 [1-2-2] Completing a scmd w/ timeout
99 retry and only allowed scmd->allowed + 1(!) times. Once the
111 2. scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD) is invoked for the
127 1. Turns on scmd->eh_eflags as requested. It's 0 for error
130 2. Links scmd->eh_entry to shost->eh_cmd_q
138 As can be seen above, once any scmd is added to shost->eh_cmd_q,
140 scmd to be issued from blk queue to the host; eventually, all scmds on
151 completed a scmd with error status, the LLDD and lower layers are
152 assumed to forget about the scmd at that point. However, if a scmd
154 about the scmd, which currently no LLDD does, the command is still
200 commands. A scmd is said to be recovered if the scmd is forgotten by
201 lower layers and lower layers are ready to process or fail the scmd
223 eh_work_q. If a recovery action succeeds for a scmd, recovered
226 Note that single recovery action on a scmd can recover multiple
234 timed-out scmds, SCSI EH ensures that LLDD forgets about a scmd
237 When a scmd is recovered, the scmd is moved from eh_work_q to EH
244 EH), REQ_FAILFAST is not set and ++scmd->retries is less than
245 scmd->allowed.
251 ACTION: scsi_eh_scmd_add() is invoked for scmd
252 - set scmd->eh_eflags
253 - add scmd to shost->eh_cmd_q
264 3. scmd recovered
265 ACTION: scsi_eh_finish_cmd() is invoked to EH-finish scmd
267 - clear scmd->eh_eflags
275 - scmd is removed from eh_done_q and scmd->eh_entry is cleared
276 - if retry is necessary, scmd is requeued using
278 - otherwise, scsi_finish_command() is invoked for scmd
303 Note that if autosense is not supported, scmd->sense_buffer
304 contains invalid sense data when error-completing the scmd
306 FAILED in such cases thus invoking SCSI EH. When the scmd
312 causes higher-severity recovery to be taken for the scmd.
314 2. Invoke scsi_decide_disposition() on the scmd
317 scmd->retries is set to scmd->allowed preventing
318 scsi_eh_flush_done_q() from retrying the scmd and
333 hostt->eh_abort_handler() is invoked for each scmd. The
335 all related hardware forget about the scmd.
337 If a timedout scmd is successfully aborted and the sdev is
339 the scmd. Otherwise, the scmd is left in eh_work_q for
348 TEST_UNIT_READY command. Note that the scmd must have been
366 that lower layers have forgotten about the scmd and we can
379 a sdev has no timed out scmd.
440 - Each failed scmd's eh_flags field is set appropriately.
442 - Each failed scmd is linked on scmd->eh_cmd_q by scmd->eh_entry.
455 - Each scmd's eh_eflags field is cleared.
457 - Each scmd is in such a state that scsi_setup_cmd_retry() on the
458 scmd doesn't make any difference.
462 - Each scmd->eh_entry is cleared.
465 each scmd. Note that the handler is free to use scmd->retries and