Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Oct 2010 10:58:52 -0700
From:      Garrett Cooper <gcooper@FreeBSD.org>
To:        Alexander Motin <mav@freebsd.org>
Cc:        Bruce Cran <bruce@cran.org.uk>, 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
Message-ID:  <AANLkTimYMEZ6-5M7rcG0OmsVwPs6FcB5=NwNL5gd41PV@mail.gmail.com>
In-Reply-To: <4CC47301.9020609@FreeBSD.org>
References:  <201010241631.o9OGVw1C033817@svn.freebsd.org> <201010241735.32876.bruce@cran.org.uk> <4CC466D5.6080306@FreeBSD.org> <AANLkTikj4Uo6haewmHcgXeONt5Dh6uQ0OsH6KuVwFGTx@mail.gmail.com> <4CC47301.9020609@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 24, 2010 at 10:55 AM, Alexander Motin <mav@freebsd.org> wrote:
> Garrett Cooper wrote:
>> On Sun, Oct 24, 2010 at 10:03 AM, Alexander Motin <mav@freebsd.org> wrot=
e:
>>> 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) =
since
>>>>> 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 c=
ontrols
>>>>> =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 c=
ause
>>>>> damage to the actuator.
>>>> The FLUSH CACHE + STANDBY IMMEDIATE commands are issued (instead of ju=
st
>>>> SLEEP) following the procedure documented in Fujitsu's MHW series prod=
uct
>>>> 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.
>>
>> =A0 =A0 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 CD=
B
>> 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 endin=
g status
>> according to the IMMED bit (see 9.11.2) with the additional sense code s=
et to
>> COMMAND SEQUENCE ERROR;
>> 4) If the ATA flush command completes without error, then issue an ATA S=
TANDBY
>> 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.
>>
>> =A0 =A0 Not sure about the ATA spec standalone... might be present in th=
e ATA8 spec.
>
> As I understand, this just confirms what I have said:
> SCSI STOP =3D=3D ATA FLUSH CACHE + STANDBY IMMEDIATE.
> So SCSI STOP implies flush, while ATA STANDBY IMMEDIATE doesn't.

Looking at it from that perspective, I agree.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimYMEZ6-5M7rcG0OmsVwPs6FcB5=NwNL5gd41PV>