linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Retry commands with UNIT_ATTENTION sense codes
@ 2010-05-04 14:48 Hannes Reinecke
  2010-05-04 16:26 ` James Bottomley
  0 siblings, 1 reply; 9+ messages in thread
From: Hannes Reinecke @ 2010-05-04 14:48 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi


We have to enable retries for UNIT_ATTENTION sense codes, as a
command might've been injected from the block layer (eg barrier
requests). And for those no error recovers takes place, so we
need to make sure that the SCSI midlayer corrects any transient
errors.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/scsi/scsi_error.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index d45c69c..663a1ad 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -290,19 +290,13 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
 			return NEEDS_RETRY;
 		}
 		/*
-		 * if the device is in the process of becoming ready, we 
-		 * should retry.
-		 */
-		if ((sshdr.asc == 0x04) && (sshdr.ascq == 0x01))
-			return NEEDS_RETRY;
-		/*
 		 * if the device is not started, we need to wake
 		 * the error handler to start the motor
 		 */
 		if (scmd->device->allow_restart &&
 		    (sshdr.asc == 0x04) && (sshdr.ascq == 0x02))
 			return FAILED;
-		return SUCCESS;
+		return NEEDS_RETRY;
 
 		/* these three are not supported */
 	case COPY_ABORTED:
-- 
1.6.0.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-05-05 13:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-04 14:48 [PATCH] Retry commands with UNIT_ATTENTION sense codes Hannes Reinecke
2010-05-04 16:26 ` James Bottomley
2010-05-04 20:15   ` Mike Christie
2010-05-04 20:27     ` Mike Christie
2010-05-04 20:30       ` James Bottomley
2010-05-04 20:51         ` James Bottomley
2010-05-05  6:26         ` Hannes Reinecke
2010-05-05 13:19           ` James Bottomley
2010-05-05 13:28             ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).