Re: Question about "Not Ready" SCSI error

From: Johannes Weiner
Date: Sun Jul 30 2006 - 17:51:54 EST


Hi,

On Sun, Jul 30, 2006 at 08:10:19PM +0200, Patrick Mau wrote:
> Google revealed[1] that the drive is waiting for a START UNIT command,
> but it seems that the kernel is not attempting to spin up the drive
> again.

I don't know exactly if it's enough to requeue the scsi command, please
comment on this, guys.

Signed-off-by: Johannes Weiner <hnazfoo@xxxxxxxxx>
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 077c1c6..545b900 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -913,6 +913,7 @@ void scsi_io_completion(struct scsi_cmnd
if (sshdr.asc == 0x04) {
switch (sshdr.ascq) {
case 0x01: /* becoming ready */
+ case 0x02: /* waiting for spin up */
case 0x04: /* format in progress */
case 0x05: /* rebuild in progress */
case 0x06: /* recalculation in progress */