summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2008-07-17 04:28:33 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-07-26 15:14:55 -0400
commit511e44f42e3239a4df77b8e0e46d294d98a768ad (patch)
treea0af26ec88cbf65b79aa23640035fbdb7fca795b /drivers/scsi/scsi_lib.c
parent7027ad72a689797475973c6feb5f0b673382f779 (diff)
downloadlwn-511e44f42e3239a4df77b8e0e46d294d98a768ad.tar.gz
lwn-511e44f42e3239a4df77b8e0e46d294d98a768ad.zip
[SCSI] Do not retry a request whose data integrity check failed
If initiator or target reject the I/O due to DIF errors there is no point in retrying. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index a47c05d7829a..a20730c48020 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -950,9 +950,14 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
* 6-byte command.
*/
scsi_requeue_command(q, cmd);
- return;
- } else {
+ } else if (sshdr.asc == 0x10) /* DIX */
+ scsi_end_request(cmd, -EIO, this_count, 0);
+ else
scsi_end_request(cmd, -EIO, this_count, 1);
+ return;
+ case ABORTED_COMMAND:
+ if (sshdr.asc == 0x10) { /* DIF */
+ scsi_end_request(cmd, -EIO, this_count, 0);
return;
}
break;