From owner-freebsd-scsi Thu May 23 23:52:57 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id XAA03673 for freebsd-scsi-outgoing; Thu, 23 May 1996 23:52:57 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id XAA03668 for ; Thu, 23 May 1996 23:52:49 -0700 (PDT) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id IAA25252; Fri, 24 May 1996 08:51:30 +0200 Received: by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id IAA17497; Fri, 24 May 1996 08:51:29 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id IAA21649; Fri, 24 May 1996 08:25:15 +0200 (MET DST) From: J Wunsch Message-Id: <199605240625.IAA21649@uriah.heep.sax.de> Subject: Re: How to send "start unit" to disk during boot? To: freebsd-scsi@freebsd.org Date: Fri, 24 May 1996 08:25:15 +0200 (MET DST) Cc: af@biomath.jussieu.fr Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199605232112.WAA03275@garfield.biomath.jussieu.fr> from "af@biomath.jussieu.fr" at "May 23, 96 10:12:32 pm" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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. ;-)