mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
scsi: make asynchronous aborts mandatory
There hasn't been any reports for HBAs where asynchronous abort would not work, so we should make it mandatory and remove the fallback. Signed-off-by: Hannes Reinecke <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
This commit is contained in:
parent
2171b6d08b
commit
a06586325f
5 changed files with 15 additions and 94 deletions
|
|
@ -70,7 +70,7 @@ with the command.
|
|||
scmd is requeued to blk queue.
|
||||
|
||||
- otherwise
|
||||
scsi_eh_scmd_add(scmd, 0) is invoked for the command. See
|
||||
scsi_eh_scmd_add(scmd) is invoked for the command. See
|
||||
[1-3] for details of this function.
|
||||
|
||||
|
||||
|
|
@ -103,9 +103,7 @@ function
|
|||
eh_timed_out() callback did not handle the command.
|
||||
Step #2 is taken.
|
||||
|
||||
2. If the host supports asynchronous completion (as indicated by the
|
||||
no_async_abort setting in the host template) scsi_abort_command()
|
||||
is invoked to schedule an asynchrous abort.
|
||||
2. scsi_abort_command() is invoked to schedule an asynchrous abort.
|
||||
Asynchronous abort are not invoked for commands which the
|
||||
SCSI_EH_ABORT_SCHEDULED flag is set (this indicates that the command
|
||||
already had been aborted once, and this is a retry which failed),
|
||||
|
|
@ -127,16 +125,13 @@ function
|
|||
|
||||
scmds enter EH via scsi_eh_scmd_add(), which does the following.
|
||||
|
||||
1. Turns on scmd->eh_eflags as requested. It's 0 for error
|
||||
completions and SCSI_EH_CANCEL_CMD for timeouts.
|
||||
1. Links scmd->eh_entry to shost->eh_cmd_q
|
||||
|
||||
2. Links scmd->eh_entry to shost->eh_cmd_q
|
||||
2. Sets SHOST_RECOVERY bit in shost->shost_state
|
||||
|
||||
3. Sets SHOST_RECOVERY bit in shost->shost_state
|
||||
3. Increments shost->host_failed
|
||||
|
||||
4. Increments shost->host_failed
|
||||
|
||||
5. Wakes up SCSI EH thread if shost->host_busy == shost->host_failed
|
||||
4. Wakes up SCSI EH thread if shost->host_busy == shost->host_failed
|
||||
|
||||
As can be seen above, once any scmd is added to shost->eh_cmd_q,
|
||||
SHOST_RECOVERY shost_state bit is turned on. This prevents any new
|
||||
|
|
@ -252,7 +247,6 @@ scmd->allowed.
|
|||
|
||||
1. Error completion / time out
|
||||
ACTION: scsi_eh_scmd_add() is invoked for scmd
|
||||
- set scmd->eh_eflags
|
||||
- add scmd to shost->eh_cmd_q
|
||||
- set SHOST_RECOVERY
|
||||
- shost->host_failed++
|
||||
|
|
|
|||
Loading…
Reference in a new issue