diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi_error.c | 10 | ||||
-rw-r--r-- | drivers/scsi/scsi_scan.c | 10 |
2 files changed, 20 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 | ||
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 56a93794c470..d947ffc20ceb 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -764,6 +764,16 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, | |||
764 | sdev->model = (char *) (sdev->inquiry + 16); | 764 | sdev->model = (char *) (sdev->inquiry + 16); |
765 | sdev->rev = (char *) (sdev->inquiry + 32); | 765 | sdev->rev = (char *) (sdev->inquiry + 32); |
766 | 766 | ||
767 | if (strncmp(sdev->vendor, "ATA ", 8) == 0) { | ||
768 | /* | ||
769 | * sata emulation layer device. This is a hack to work around | ||
770 | * the SATL power management specifications which state that | ||
771 | * when the SATL detects the device has gone into standby | ||
772 | * mode, it shall respond with NOT READY. | ||
773 | */ | ||
774 | sdev->allow_restart = 1; | ||
775 | } | ||
776 | |||
767 | if (*bflags & BLIST_ISROM) { | 777 | if (*bflags & BLIST_ISROM) { |
768 | sdev->type = TYPE_ROM; | 778 | sdev->type = TYPE_ROM; |
769 | sdev->removable = 1; | 779 | sdev->removable = 1; |