diff options
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r-- | drivers/scsi/scsi_error.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 9a6f8468225f..bc5ff6ff9c79 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -459,14 +459,6 @@ static int scsi_check_sense(struct scsi_cmnd *scmd) | |||
459 | if (! scsi_command_normalize_sense(scmd, &sshdr)) | 459 | if (! scsi_command_normalize_sense(scmd, &sshdr)) |
460 | return FAILED; /* no valid sense data */ | 460 | return FAILED; /* no valid sense data */ |
461 | 461 | ||
462 | if (scmd->cmnd[0] == TEST_UNIT_READY && scmd->scsi_done != scsi_eh_done) | ||
463 | /* | ||
464 | * nasty: for mid-layer issued TURs, we need to return the | ||
465 | * actual sense data without any recovery attempt. For eh | ||
466 | * issued ones, we need to try to recover and interpret | ||
467 | */ | ||
468 | return SUCCESS; | ||
469 | |||
470 | scsi_report_sense(sdev, &sshdr); | 462 | scsi_report_sense(sdev, &sshdr); |
471 | 463 | ||
472 | if (scsi_sense_is_deferred(&sshdr)) | 464 | if (scsi_sense_is_deferred(&sshdr)) |
@@ -482,6 +474,14 @@ static int scsi_check_sense(struct scsi_cmnd *scmd) | |||
482 | /* handler does not care. Drop down to default handling */ | 474 | /* handler does not care. Drop down to default handling */ |
483 | } | 475 | } |
484 | 476 | ||
477 | if (scmd->cmnd[0] == TEST_UNIT_READY && scmd->scsi_done != scsi_eh_done) | ||
478 | /* | ||
479 | * nasty: for mid-layer issued TURs, we need to return the | ||
480 | * actual sense data without any recovery attempt. For eh | ||
481 | * issued ones, we need to try to recover and interpret | ||
482 | */ | ||
483 | return SUCCESS; | ||
484 | |||
485 | /* | 485 | /* |
486 | * Previous logic looked for FILEMARK, EOM or ILI which are | 486 | * Previous logic looked for FILEMARK, EOM or ILI which are |
487 | * mainly associated with tapes and returned SUCCESS. | 487 | * mainly associated with tapes and returned SUCCESS. |
@@ -2001,8 +2001,10 @@ static void scsi_restart_operations(struct Scsi_Host *shost) | |||
2001 | * is no point trying to lock the door of an off-line device. | 2001 | * is no point trying to lock the door of an off-line device. |
2002 | */ | 2002 | */ |
2003 | shost_for_each_device(sdev, shost) { | 2003 | shost_for_each_device(sdev, shost) { |
2004 | if (scsi_device_online(sdev) && sdev->locked) | 2004 | if (scsi_device_online(sdev) && sdev->was_reset && sdev->locked) { |
2005 | scsi_eh_lock_door(sdev); | 2005 | scsi_eh_lock_door(sdev); |
2006 | sdev->was_reset = 0; | ||
2007 | } | ||
2006 | } | 2008 | } |
2007 | 2009 | ||
2008 | /* | 2010 | /* |