Commit 883a030f authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Christoph Hellwig

scsi: document scsi_try_to_abort_cmd

scsi_try_to_abort_cmd() should only return SUCCESS, FAILED, or
FAST_IO_FAIL. So document that in the function description and simplify
the logging message.
Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Suggested-by: default avatarChristoph Hellwig <hch@infradead.org>
Reviewed-by: default avatarRobert Elliott <elliott@hp.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent a3a790dc
...@@ -157,8 +157,9 @@ scmd_eh_abort_handler(struct work_struct *work) ...@@ -157,8 +157,9 @@ scmd_eh_abort_handler(struct work_struct *work)
} else { } else {
SCSI_LOG_ERROR_RECOVERY(3, SCSI_LOG_ERROR_RECOVERY(3,
scmd_printk(KERN_INFO, scmd, scmd_printk(KERN_INFO, scmd,
"scmd %p abort failed, rtn %d\n", "scmd %p abort %s\n", scmd,
scmd, rtn)); (rtn == FAST_IO_FAIL) ?
"not send" : "failed"));
} }
} }
...@@ -869,7 +870,24 @@ static int scsi_try_bus_device_reset(struct scsi_cmnd *scmd) ...@@ -869,7 +870,24 @@ static int scsi_try_bus_device_reset(struct scsi_cmnd *scmd)
return rtn; return rtn;
} }
static int scsi_try_to_abort_cmd(struct scsi_host_template *hostt, struct scsi_cmnd *scmd) /**
* scsi_try_to_abort_cmd - Ask host to abort a SCSI command
* @scmd: SCSI cmd used to send a target reset
*
* Return value:
* SUCCESS, FAILED, or FAST_IO_FAIL
*
* Notes:
* SUCCESS does not necessarily indicate that the command
* has been aborted; it only indicates that the LLDDs
* has cleared all references to that command.
* LLDDs should return FAILED only if an abort was required
* but could not be executed. LLDDs should return FAST_IO_FAIL
* if the device is temporarily unavailable (eg due to a
* link down on FibreChannel)
*/
static int scsi_try_to_abort_cmd(struct scsi_host_template *hostt,
struct scsi_cmnd *scmd)
{ {
if (!hostt->eh_abort_handler) if (!hostt->eh_abort_handler)
return FAILED; return FAILED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment