diff options
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 7c4d2e68df1c..55e6ed4b886d 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -1054,7 +1054,6 @@ static int sd_done(struct scsi_cmnd *SCpnt) | |||
1054 | good_bytes = sd_completed_bytes(SCpnt); | 1054 | good_bytes = sd_completed_bytes(SCpnt); |
1055 | break; | 1055 | break; |
1056 | case RECOVERED_ERROR: | 1056 | case RECOVERED_ERROR: |
1057 | case NO_SENSE: | ||
1058 | /* Inform the user, but make sure that it's not treated | 1057 | /* Inform the user, but make sure that it's not treated |
1059 | * as a hard error. | 1058 | * as a hard error. |
1060 | */ | 1059 | */ |
@@ -1063,6 +1062,15 @@ static int sd_done(struct scsi_cmnd *SCpnt) | |||
1063 | memset(SCpnt->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); | 1062 | memset(SCpnt->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); |
1064 | good_bytes = scsi_bufflen(SCpnt); | 1063 | good_bytes = scsi_bufflen(SCpnt); |
1065 | break; | 1064 | break; |
1065 | case NO_SENSE: | ||
1066 | /* This indicates a false check condition, so ignore it. An | ||
1067 | * unknown amount of data was transferred so treat it as an | ||
1068 | * error. | ||
1069 | */ | ||
1070 | scsi_print_sense("sd", SCpnt); | ||
1071 | SCpnt->result = 0; | ||
1072 | memset(SCpnt->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); | ||
1073 | break; | ||
1066 | case ABORTED_COMMAND: | 1074 | case ABORTED_COMMAND: |
1067 | if (sshdr.asc == 0x10) { /* DIF: Disk detected corruption */ | 1075 | if (sshdr.asc == 0x10) { /* DIF: Disk detected corruption */ |
1068 | scsi_print_result(SCpnt); | 1076 | scsi_print_result(SCpnt); |