From owner-freebsd-hackers Tue Mar 4 19:55:26 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id TAA20361 for hackers-outgoing; Tue, 4 Mar 1997 19:55:26 -0800 (PST) Received: from netrover.com (ottawa8.netrover.com [205.209.19.17]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id TAA20349 for ; Tue, 4 Mar 1997 19:55:18 -0800 (PST) Received: (from brianc@localhost) by netrover.com (8.8.5/8.8.5) id WAA00491; Tue, 4 Mar 1997 22:54:16 -0500 (EST) Message-ID: Date: Tue, 4 Mar 1997 22:54:16 -0500 From: brianc@netrover.com (Brian Campbell) To: freebsd-hackers@FreeBSD.org Subject: Re: scsi spindown References: <199703030708.RAA02623@genesis.atrad.adelaide.edu.au> X-Mailer: Mutt 0.51 Mime-Version: 1.0 Reply-to: brianc@pobox.com In-Reply-To: ; from J Wunsch on Mar 3, 1997 11:17:41 +0100 Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk J Wunsch writes: > As Michael Smith wrote: > > > Has anyone modified FreeBSD-anything to spindown scsi (direct) drives > > > after some period of non-use? > > > A lot of disks will refuse to spin down. > > So you won't get this feature for these old suckers, what's the deal? I'm not sure how it's relevant. Those who have disks that don't spindown won't use the feature. It works with mine (under win95 and qnx and now freebsd). > > Better to configure your disks > > to spin themselves down using scsi(8) if they support it. > > Where should this be supported? IDE drives do sometimes support this > (though the standard is very very funky for this), but SCSI? I've > never stumpled across a mode page setting that allows for an auto > spindown. My jaz drive has an auto-spindown. I don't know which page it's in though. Looking at scsi_modes and the scsi man pages I didn't see anything that looked like what I needed. The fault I had was caused by softclock calling a timeout routine that called scsi_stop_unit that called scsi_scsi_cmd which calls tsleep. By including the SCSI_ITSDONE bit in the flags it doesn't fault and spins down/up as necessary (although I increased the timeout in scsi_start_unit by 50%) However, I get some messages I'd like to get rid of. On spindown (the first line is my printf): spindown 0.0 sd0(ahc0:0:0): timed out while idle, LASTPHASE == 0x1, SCSISIGI == 0x0 SEQADDR == 0xd Ordered Tag queued And on spinup (again the first line is my printf): spinup 0.0 Ordered Tag sent sd0(ahc0:0:0): timed out while idle, LASTPHASE == 0x1, SCSISIGI == 0x0 SEQADDR == 0xd Ordered Tag queued Ordered Tag sent Is there a flag I can set to disable these messages?