Commit fa4698fc authored by Martin K. Petersen's avatar Martin K. Petersen Committed by James Bottomley

[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: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent d44a6d2b
...@@ -1196,19 +1196,10 @@ static int sd_done(struct scsi_cmnd *SCpnt) ...@@ -1196,19 +1196,10 @@ static int sd_done(struct scsi_cmnd *SCpnt)
SCpnt->result = 0; SCpnt->result = 0;
memset(SCpnt->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); memset(SCpnt->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
break; break;
case ABORTED_COMMAND: case ABORTED_COMMAND: /* DIF: Target detected corruption */
if (sshdr.asc == 0x10) { /* DIF: Disk detected corruption */ case ILLEGAL_REQUEST: /* DIX: Host detected corruption */
scsi_print_result(SCpnt); if (sshdr.asc == 0x10)
scsi_print_sense("sd", SCpnt);
good_bytes = sd_completed_bytes(SCpnt); good_bytes = sd_completed_bytes(SCpnt);
}
break;
case ILLEGAL_REQUEST:
if (sshdr.asc == 0x10) { /* DIX: HBA detected corruption */
scsi_print_result(SCpnt);
scsi_print_sense("sd", SCpnt);
good_bytes = sd_completed_bytes(SCpnt);
}
break; break;
default: default:
break; break;
......
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