summaryrefslogtreecommitdiff
path: root/sys/scsi/scsi_base.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2008-06-15 00:52:26 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2008-06-15 00:52:26 +0000
commit61395e85722f2a2cd003f0854b2f69141bae1919 (patch)
treef7fd0ae8f354c128017d27f35ee8b3b1acf926fb /sys/scsi/scsi_base.c
parent216d5b845bb98ff774cb0ead549e7ba1a88e3309 (diff)
Treat SENSE_NOT_READY_INIT_REQUIRED sense errors the same as
SENSE_NOT_READY_BECOMING_READY sense errors. Some devices such as USB Zip250 drives return the former when they mean the latter. Give the first TEST UNIT READY command three times the usual retries so more devices have time to get ready. This allows more removable devices to detect media details and avoid issuing 'drive offline' messages. ok marco@
Diffstat (limited to 'sys/scsi/scsi_base.c')
-rw-r--r--sys/scsi/scsi_base.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index 20e8ccee5ec..438da837e9c 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_base.c,v 1.126 2008/06/14 01:57:51 krw Exp $ */
+/* $OpenBSD: scsi_base.c,v 1.127 2008/06/15 00:52:25 krw Exp $ */
/* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */
/*
@@ -1062,9 +1062,10 @@ scsi_interpret_sense(struct scsi_xfer *xs)
case SENSE_NOT_READY_INPROGRESS:
case SENSE_NOT_READY_LONGWRITE:
case SENSE_NOT_READY_SELFTEST:
+ case SENSE_NOT_READY_INIT_REQUIRED:
SC_DEBUG(sc_link, SDEV_DB1,
- ("not ready: busy (%#x)\n",
- sense->add_sense_code_qual));
+ ("not ready (ASC_ASCQ == %#x)\n",
+ ASC_ASCQ(sense)));
return (scsi_delay(xs, 1));
case SENSE_NOMEDIUM:
case SENSE_NOMEDIUM_TCLOSED: