Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83b12edd authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Greg Kroah-Hartman
Browse files

scsi: correct return values for .eh_abort_handler implementations



commit b6c92b7e0af575e2b8b05bdf33633cf9e1661cbf 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>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2e36a016
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -2651,7 +2651,7 @@ static void NCR5380_dma_complete(NCR5380_instance * instance) {
 *      host byte of the result field to, if zero DID_ABORTED is
 *      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
 *	connected, you have to wait for it to complete.  If this is
@@ -2704,7 +2704,7 @@ static int NCR5380_abort(Scsi_Cmnd * cmd) {
 * aborted flag and get back into our main loop.
 */

		return 0;
		return SUCCESS;
	}
#endif

+1 −1
Original line number Diff line number Diff line
@@ -531,7 +531,7 @@ static int aha1740_eh_abort_handler (Scsi_Cmnd *dummy)
 * quiet as possible...
 */

	return 0;
	return SUCCESS;
}

static struct scsi_host_template aha1740_template = {
+1 −1
Original line number Diff line number Diff line
@@ -2607,7 +2607,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
 *	host byte of the result field to, if zero DID_ABORTED is
 *	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
 *	 connected, you have to wait for it to complete.  If this is
+1 −1
Original line number Diff line number Diff line
@@ -1057,7 +1057,7 @@ int esas2r_eh_abort(struct scsi_cmnd *cmd)

		cmd->scsi_done(cmd);

		return 0;
		return SUCCESS;
	}

	spin_lock_irqsave(&a->queue_lock, flags);
+4 −4
Original line number Diff line number Diff line
@@ -1945,7 +1945,7 @@ megaraid_abort_and_reset(adapter_t *adapter, Scsi_Cmnd *cmd, int aor)
	     cmd->device->id, (u32)cmd->device->lun);

	if(list_empty(&adapter->pending_list))
		return FALSE;
		return FAILED;

	list_for_each_safe(pos, next, &adapter->pending_list) {

@@ -1968,7 +1968,7 @@ megaraid_abort_and_reset(adapter_t *adapter, Scsi_Cmnd *cmd, int aor)
					(aor==SCB_ABORT) ? "ABORTING":"RESET",
					scb->idx);

				return FALSE;
				return FAILED;
			}
			else {

@@ -1993,12 +1993,12 @@ megaraid_abort_and_reset(adapter_t *adapter, Scsi_Cmnd *cmd, int aor)
				list_add_tail(SCSI_LIST(cmd),
						&adapter->completed_list);

				return TRUE;
				return SUCCESS;
			}
		}
	}

	return FALSE;
	return FAILED;
}

static inline int
Loading