Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322602
b: refs/heads/master
c: 1421656
h: refs/heads/master
v: v3
  • Loading branch information
James Bottomley authored and James Bottomley committed Aug 22, 2012
1 parent 236bf44 commit 2b896dc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 27c419739b67decced4650440829b8d51bef954b
refs/heads/master: 14216561e164671ce147458653b1fea06a4ada1e
10 changes: 10 additions & 0 deletions trunk/drivers/scsi/scsi_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@

#include <trace/events/scsi.h>

static void scsi_eh_done(struct scsi_cmnd *scmd);

#define SENSE_TIMEOUT (10*HZ)

/*
Expand Down Expand Up @@ -241,6 +243,14 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
if (! scsi_command_normalize_sense(scmd, &sshdr))
return FAILED; /* no valid sense data */

if (scmd->cmnd[0] == TEST_UNIT_READY && scmd->scsi_done != scsi_eh_done)
/*
* nasty: for mid-layer issued TURs, we need to return the
* actual sense data without any recovery attempt. For eh
* issued ones, we need to try to recover and interpret
*/
return SUCCESS;

if (scsi_sense_is_deferred(&sshdr))
return NEEDS_RETRY;

Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/scsi/scsi_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,16 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
sdev->model = (char *) (sdev->inquiry + 16);
sdev->rev = (char *) (sdev->inquiry + 32);

if (strncmp(sdev->vendor, "ATA ", 8) == 0) {
/*
* sata emulation layer device. This is a hack to work around
* the SATL power management specifications which state that
* when the SATL detects the device has gone into standby
* mode, it shall respond with NOT READY.
*/
sdev->allow_restart = 1;
}

if (*bflags & BLIST_ISROM) {
sdev->type = TYPE_ROM;
sdev->removable = 1;
Expand Down

0 comments on commit 2b896dc

Please sign in to comment.