diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2010-01-18 18:43:18 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-02-08 19:30:39 -0500 |
commit | fa4698fcf59c3bd01c171e5e558bae9e8eb396f1 (patch) | |
tree | 7c50e3c7d94ed1c855de23bf39b66f51e018661b /drivers/scsi/sd.c | |
parent | d44a6d2bbffd9e5c87f0a78cbe9c089e21289162 (diff) |
[SCSI] sd: Combine DIF/DIX error handling
DIF and DIX errors are handled identically at this point. Collapse the
switch cases into one and let scsi_io_completion print result and sense
data.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index c5e9a99d4066..908d400b601a 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -1196,19 +1196,10 @@ static int sd_done(struct scsi_cmnd *SCpnt) | |||
1196 | SCpnt->result = 0; | 1196 | SCpnt->result = 0; |
1197 | memset(SCpnt->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); | 1197 | memset(SCpnt->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); |
1198 | break; | 1198 | break; |
1199 | case ABORTED_COMMAND: | 1199 | case ABORTED_COMMAND: /* DIF: Target detected corruption */ |
1200 | if (sshdr.asc == 0x10) { /* DIF: Disk detected corruption */ | 1200 | case ILLEGAL_REQUEST: /* DIX: Host detected corruption */ |
1201 | scsi_print_result(SCpnt); | 1201 | if (sshdr.asc == 0x10) |
1202 | scsi_print_sense("sd", SCpnt); | ||
1203 | good_bytes = sd_completed_bytes(SCpnt); | 1202 | good_bytes = sd_completed_bytes(SCpnt); |
1204 | } | ||
1205 | break; | ||
1206 | case ILLEGAL_REQUEST: | ||
1207 | if (sshdr.asc == 0x10) { /* DIX: HBA detected corruption */ | ||
1208 | scsi_print_result(SCpnt); | ||
1209 | scsi_print_sense("sd", SCpnt); | ||
1210 | good_bytes = sd_completed_bytes(SCpnt); | ||
1211 | } | ||
1212 | break; | 1203 | break; |
1213 | default: | 1204 | default: |
1214 | break; | 1205 | break; |