Commit 27bdcd72 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Ben Hutchings

scsi: correct return values for .eh_abort_handler implementations

commit b6c92b7e upstream.

The .eh_abort_handler needs to return SUCCESS, FAILED, or
FAST_IO_FAIL. So fixup all callers to adhere to this requirement.
Reviewed-by: default avatarRobert Elliott <elliott@hp.com>
Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
[bwh: Backported to 3.2: drop changes to esas2r]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent e316075b
...@@ -2666,7 +2666,7 @@ static void NCR5380_dma_complete(NCR5380_instance * instance) { ...@@ -2666,7 +2666,7 @@ static void NCR5380_dma_complete(NCR5380_instance * instance) {
* host byte of the result field to, if zero DID_ABORTED is * host byte of the result field to, if zero DID_ABORTED is
* used. * used.
* *
* Returns : 0 - success, -1 on failure. * Returns : SUCCESS - success, FAILED on failure.
* *
* XXX - there is no way to abort the command that is currently * XXX - there is no way to abort the command that is currently
* connected, you have to wait for it to complete. If this is * connected, you have to wait for it to complete. If this is
...@@ -2719,7 +2719,7 @@ static int NCR5380_abort(Scsi_Cmnd * cmd) { ...@@ -2719,7 +2719,7 @@ static int NCR5380_abort(Scsi_Cmnd * cmd) {
* aborted flag and get back into our main loop. * aborted flag and get back into our main loop.
*/ */
return 0; return SUCCESS;
} }
#endif #endif
......
...@@ -551,7 +551,7 @@ static int aha1740_eh_abort_handler (Scsi_Cmnd *dummy) ...@@ -551,7 +551,7 @@ static int aha1740_eh_abort_handler (Scsi_Cmnd *dummy)
* quiet as possible... * quiet as possible...
*/ */
return 0; return SUCCESS;
} }
static struct scsi_host_template aha1740_template = { static struct scsi_host_template aha1740_template = {
......
...@@ -2638,7 +2638,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance) ...@@ -2638,7 +2638,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
* host byte of the result field to, if zero DID_ABORTED is * host byte of the result field to, if zero DID_ABORTED is
* used. * used.
* *
* Returns : 0 - success, -1 on failure. * Returns : SUCCESS - success, FAILED on failure.
* *
* XXX - there is no way to abort the command that is currently * XXX - there is no way to abort the command that is currently
* connected, you have to wait for it to complete. If this is * connected, you have to wait for it to complete. If this is
......
...@@ -1964,7 +1964,7 @@ megaraid_abort_and_reset(adapter_t *adapter, Scsi_Cmnd *cmd, int aor) ...@@ -1964,7 +1964,7 @@ megaraid_abort_and_reset(adapter_t *adapter, Scsi_Cmnd *cmd, int aor)
cmd->device->id, cmd->device->lun); cmd->device->id, cmd->device->lun);
if(list_empty(&adapter->pending_list)) if(list_empty(&adapter->pending_list))
return FALSE; return FAILED;
list_for_each_safe(pos, next, &adapter->pending_list) { list_for_each_safe(pos, next, &adapter->pending_list) {
...@@ -1987,7 +1987,7 @@ megaraid_abort_and_reset(adapter_t *adapter, Scsi_Cmnd *cmd, int aor) ...@@ -1987,7 +1987,7 @@ megaraid_abort_and_reset(adapter_t *adapter, Scsi_Cmnd *cmd, int aor)
(aor==SCB_ABORT) ? "ABORTING":"RESET", (aor==SCB_ABORT) ? "ABORTING":"RESET",
scb->idx); scb->idx);
return FALSE; return FAILED;
} }
else { else {
...@@ -2012,12 +2012,12 @@ megaraid_abort_and_reset(adapter_t *adapter, Scsi_Cmnd *cmd, int aor) ...@@ -2012,12 +2012,12 @@ megaraid_abort_and_reset(adapter_t *adapter, Scsi_Cmnd *cmd, int aor)
list_add_tail(SCSI_LIST(cmd), list_add_tail(SCSI_LIST(cmd),
&adapter->completed_list); &adapter->completed_list);
return TRUE; return SUCCESS;
} }
} }
} }
return FALSE; return FAILED;
} }
static inline int static inline int
......
...@@ -2627,7 +2627,7 @@ static void NCR5380_reselect (struct Scsi_Host *instance) ...@@ -2627,7 +2627,7 @@ static void NCR5380_reselect (struct Scsi_Host *instance)
* host byte of the result field to, if zero DID_ABORTED is * host byte of the result field to, if zero DID_ABORTED is
* used. * used.
* *
* Returns : 0 - success, -1 on failure. * Returns : SUCCESS - success, FAILED on failure.
* *
* XXX - there is no way to abort the command that is currently * XXX - there is no way to abort the command that is currently
* connected, you have to wait for it to complete. If this is * connected, you have to wait for it to complete. If this is
......
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