From 61395e85722f2a2cd003f0854b2f69141bae1919 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Sun, 15 Jun 2008 00:52:26 +0000 Subject: 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@ --- sys/scsi/scsi_base.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/scsi/scsi_base.c') 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: -- cgit v1.2.3