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.
This commit is contained in:
Joerg Wunsch 1997-10-12 08:54:47 +00:00
parent 02630e3d73
commit 4dec470e39
2 changed files with 9 additions and 8 deletions

View File

@ -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));
}

View File

@ -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"
@ -186,6 +186,12 @@ sdattach(struct scsi_link *sc_link)
sc_link->opennings = SDOUTSTANDING;
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
@ -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.