diff options
Diffstat (limited to 'drivers/scsi/scsi_error.c')
| -rw-r--r-- | drivers/scsi/scsi_error.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 4a6381c87253..de2337f255a7 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
| @@ -42,6 +42,8 @@ | |||
| 42 | 42 | ||
| 43 | #include <trace/events/scsi.h> | 43 | #include <trace/events/scsi.h> |
| 44 | 44 | ||
| 45 | static void scsi_eh_done(struct scsi_cmnd *scmd); | ||
| 46 | |||
| 45 | #define SENSE_TIMEOUT (10*HZ) | 47 | #define SENSE_TIMEOUT (10*HZ) |
| 46 | 48 | ||
| 47 | /* | 49 | /* |
| @@ -241,6 +243,14 @@ static int scsi_check_sense(struct scsi_cmnd *scmd) | |||
| 241 | if (! scsi_command_normalize_sense(scmd, &sshdr)) | 243 | if (! scsi_command_normalize_sense(scmd, &sshdr)) |
| 242 | return FAILED; /* no valid sense data */ | 244 | return FAILED; /* no valid sense data */ |
| 243 | 245 | ||
| 246 | if (scmd->cmnd[0] == TEST_UNIT_READY && scmd->scsi_done != scsi_eh_done) | ||
| 247 | /* | ||
| 248 | * nasty: for mid-layer issued TURs, we need to return the | ||
| 249 | * actual sense data without any recovery attempt. For eh | ||
| 250 | * issued ones, we need to try to recover and interpret | ||
| 251 | */ | ||
| 252 | return SUCCESS; | ||
| 253 | |||
| 244 | if (scsi_sense_is_deferred(&sshdr)) | 254 | if (scsi_sense_is_deferred(&sshdr)) |
| 245 | return NEEDS_RETRY; | 255 | return NEEDS_RETRY; |
| 246 | 256 | ||
