Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 May 1996 08:25:15 +0200 (MET DST)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        freebsd-scsi@freebsd.org
Cc:        af@biomath.jussieu.fr
Subject:   Re: How to send "start unit" to disk during boot?
Message-ID:  <199605240625.IAA21649@uriah.heep.sax.de>
In-Reply-To: <199605232112.WAA03275@garfield.biomath.jussieu.fr> from "af@biomath.jussieu.fr" at "May 23, 96 10:12:32 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
As af@biomath.jussieu.fr wrote:

> >From  the  FAQ,  I can guess that the SCSI inquiry FreeBSD sends before
> waiting SCSI_DELAY does *not* cause the disk to start,  and  then  the
> subsequent mount attempt fails.

The disk doesn't need to be spinning in order to get the INQUIRY data.

> How  can  I  make  FreeBSD  issue  a  "start unit" command to the disk
> *before* it waits for SCSI devices to  settle ?

There's already a START STOP UNIT in sdopen(), so you should try to
find out why mounting still fails.  As a starting point, try this:

Index: sys/scsi/sd.c
===================================================================
RCS file: /home/ncvs/src/sys/scsi/sd.c,v
retrieving revision 1.89
diff -u -u -r1.89 sd.c
--- sd.c	1996/05/02 22:20:52	1.89
+++ sd.c	1996/05/24 06:22:39
@@ -290,6 +290,11 @@
 		dev, unit, PARTITION(dev)));
 
 	/*
+	 * 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);
+	/*
 	 * "unit attention" errors should occur here if the
 	 * drive has been restarted or the pack changed.
 	 * just ingnore the result, it's a decoy instruction
@@ -316,11 +321,6 @@
 		else
 			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.


-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605240625.IAA21649>