From owner-svn-src-all@FreeBSD.ORG Sun Oct 24 17:48:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 952CE106566C; Sun, 24 Oct 2010 17:48:03 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id A58D38FC0C; Sun, 24 Oct 2010 17:48:02 +0000 (UTC) Received: by wwb24 with SMTP id 24so2524953wwb.31 for ; Sun, 24 Oct 2010 10:48:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=kn1xHWXUzSuEBBiJnszf3n8EHIEk98x4G3Xvi/1obXI=; b=sglQFp5RvQMhS0fWpO53BnjWkRQ66FfMEvw1xpQ3MoFjF+9w4jbsxEAmwoTHLVUdNp bEdHaTl+Tl8iP3R3ycZb075r4nYA3Mb9fi7vV8GB2OcWdGObns4RgkRv7jw4A/Pz//gC H3LIIcWVmYPxGU+pgCVxqalx15WuCVva3lcKQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=LVGbwBVFR3eE8OZ5KglK3p8LYL2uFFTL3rKUiakLJcfkkhkvI9hZG8pIt4AsqYSfZr 1z8HpmrWVjDf1VYOaxGwB+7sbHVNssyEyQFkUT6vQ05iYEzxmGmqHFAONk59i6hdYg/Q 00z9HPnDcBde1h3zxR++bpRkTWR+I+ODbCRdY= MIME-Version: 1.0 Received: by 10.216.51.21 with SMTP id a21mr5182008wec.50.1287942481516; Sun, 24 Oct 2010 10:48:01 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.216.10.198 with HTTP; Sun, 24 Oct 2010 10:48:01 -0700 (PDT) In-Reply-To: <4CC466D5.6080306@FreeBSD.org> References: <201010241631.o9OGVw1C033817@svn.freebsd.org> <201010241735.32876.bruce@cran.org.uk> <4CC466D5.6080306@FreeBSD.org> Date: Sun, 24 Oct 2010 10:48:01 -0700 X-Google-Sender-Auth: nCRq69EH9kF-5fbE9fnXC4NqJJM Message-ID: From: Garrett Cooper To: Alexander Motin Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Cc: Bruce Cran , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r214279 - in head: share/man/man4 sys/cam sys/cam/ata sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Oct 2010 17:48:03 -0000 On Sun, Oct 24, 2010 at 10:03 AM, Alexander Motin wrote: > Bruce Cran wrote: >> On Sunday 24 October 2010 17:31:58 Bruce Cran wrote: >> >>> Log: >>> =A0 Mostly revert r203420, and add similar functionality into ada(4) si= nce >>> the existing code caused problems with some SCSI controllers. > > Proper way would be IMHO to fix polling in aac driver. > >>> =A0 A new sysctl kern.cam.ada.spindown_shutdown has been added that con= trols >>> =A0 whether or not to spin-down disks when shutting down. >>> =A0 Spinning down the disks unloads/parks the heads - this is >>> =A0 much better than removing power when the disk is still >>> =A0 spinning because otherwise an Emergency Unload occurs which may cau= se >>> damage to the actuator. >> >> The FLUSH CACHE + STANDBY IMMEDIATE commands are issued (instead of just >> SLEEP) following the procedure documented in Fujitsu's MHW series produc= t >> documentation under section 1.10.1, "Recommended power-off sequence". > > Not instead of "just SLEEP", but instead of FLUSH CACHE (by respective > peripheral driver) + SLEEP (by xpt). It should probably be the same. > > Just for the note, SCSI specification states that STOP automatically > implies FLUSH CACHE. ATA - doesn't. I could be wrong, but I think the ANSI ATA<->SCSI spec states otherwise (taken from ANSI INCITS 431-2007 page 62 -- see steps 1-4): 9.11.3 START STOP UNIT START bit LOEJ bit combinations The SATL shall perform the actions shown in table 40 in response to a START STOP UNIT command. Table 40 =97 Definition of START and LOEJ bits in the START STOP UNIT CDB START LOEJ Definition 0 0 The SATL shall: 1) If the IMMED bit is set to one, then return GOOD status; 2) Issue an ATA flush command (see 3.1.11) to the ATA device; 3) If the ATA flush command completes with any error, then process ending s= tatus according to the IMMED bit (see 9.11.2) with the additional sense code set = to COMMAND SEQUENCE ERROR; 4) If the ATA flush command completes without error, then issue an ATA STAN= DBY IMMEDIATE command to the ATA Sector Count set to zero; 5) If the ATA STANDBY IMMEDIATE command completes with any error, then process ending status according to the IMMED bit (see 9.11.2) with the additional sense code set to COMMAND SEQUENCE ERROR; and 6) If the ATA STANDBY IMMEDIATE command completes without error and the IMMED bit is set to zero, then return GOOD status (see 9.11.2) a. Not sure about the ATA spec standalone... might be present in the ATA8 = spec. Thanks! -Garrett