Skip to content

Commit

Permalink
[SCSI] fix ABORTED_COMMAND looping forever problem
Browse files Browse the repository at this point in the history
Instead of terminating after five retries, commands terminated by
ABORTED_COMMAND sense are retrying forever.  The problem was
introduced by:

commit b60af5b
Author: Alan Stern <stern@rowland.harvard.edu>
Date:   Mon Nov 3 15:56:47 2008 -0500

    [SCSI] simplify scsi_io_completion()

Which introduced an error whereby ABORTED_COMMAND now gets erroneously
retried in scsi_io_completion.  Fix this by returning the behaviour
back to the default no retry.

Reported-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Tested-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
James Bottomley authored and James Bottomley committed Feb 22, 2009
1 parent 4034cc6 commit 126c098
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1040,12 +1040,11 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
action = ACTION_FAIL;
break;
case ABORTED_COMMAND:
action = ACTION_FAIL;
if (sshdr.asc == 0x10) { /* DIF */
description = "Target Data Integrity Failure";
action = ACTION_FAIL;
error = -EILSEQ;
} else
action = ACTION_RETRY;
}
break;
case NOT_READY:
/* If the device is in the process of becoming
Expand Down

0 comments on commit 126c098

Please sign in to comment.