summaryrefslogtreecommitdiffstats
path: root/sys/scsi
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1997-10-12 08:54:47 +0000
committerjoerg <joerg@FreeBSD.org>1997-10-12 08:54:47 +0000
commit7694ff86635adf922f9ec5f1f897116657283fee (patch)
tree5f4f7301cc53bd0e871710f0973e4d2e44d1460d /sys/scsi
parentb456ae04aa2f4ea1f131c858ce91bed737f7d8cc (diff)
downloadFreeBSD-src-7694ff86635adf922f9ec5f1f897116657283fee.zip
FreeBSD-src-7694ff86635adf922f9ec5f1f897116657283fee.tar.gz
Remove the call to scsi_start_unit() from sd_open(). It was causing
much grieve to owners of IBM drives when used in conjunction with tagged command queuing, and didn't serve any purpose at all (since experiments have proven that it simply didn't work). Instead, call scsi_start_unit() once in sd_attach(), so in case the drive has been configured to `remote start', it will spin up there. (If it has spun down later, it must have been because of administrator action (scsi(8)) anyway.) While i was at it, bump the timeout for scsi_start_unit() to 30 seconds. 10 seconds were way too few for most drives.
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/scsi_base.c4
-rw-r--r--sys/scsi/sd.c13
2 files changed, 9 insertions, 8 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index 20a8ba9..2ac7581 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -8,7 +8,7 @@
* file.
*
* Written by Julian Elischer (julian@dialix.oz.au)
- * $Id: scsi_base.c,v 1.50 1997/09/02 20:06:33 bde Exp $
+ * $Id: scsi_base.c,v 1.51 1997/09/21 22:03:07 gibbs Exp $
*/
#include "opt_bounce.h"
@@ -331,7 +331,7 @@ scsi_start_unit(sc_link, flags)
0,
0,
2,
- 10000,
+ 30000,
NULL,
flags));
}
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 1793201..49a18f8 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -15,7 +15,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992
*
- * $Id: sd.c,v 1.110 1997/09/13 16:12:15 joerg Exp $
+ * $Id: sd.c,v 1.111 1997/09/21 22:03:14 gibbs Exp $
*/
#include "opt_bounce.h"
@@ -187,6 +187,12 @@ sdattach(struct scsi_link *sc_link)
bufq_init(&sd->buf_queue);
/*
+ * In case it is a funny one, tell it to start
+ * not needed for most hard drives (ignore failure)
+ */
+ scsi_start_unit(sc_link,
+ SCSI_ERR_OK | SCSI_SILENT | SCSI_NOSLEEP | SCSI_NOMASK);
+ /*
* Use the subdriver to request information regarding
* the drive. We cannot use interrupts yet, so the
* request must specify this.
@@ -294,11 +300,6 @@ sd_open(dev, mode, fmt, p, sc_link)
dsgone(&sd->dk_slices);
}
- /*
- * In case it is a funny one, tell it to start
- * not needed for most hard drives (ignore failure)
- */
- scsi_start_unit(sc_link, SCSI_ERR_OK | SCSI_SILENT);
/*
* Check that it is still responding and ok.
OpenPOWER on IntegriCloud