All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: olecom@mail.ru
Cc: Linux SCSI <linux-scsi@vger.kernel.org>
Subject: Re: [sbp2] external hard disk shutdown timer
Date: Mon, 07 Aug 2006 19:55:13 -0400	[thread overview]
Message-ID: <44D7D2E1.9010104@torque.net> (raw)
In-Reply-To: <E1GACIH-00043x-00.olecom-mail-ru@f58.mail.ru>

olecom@mail.ru wrote:
> Hallo ! Let me ask a question.
> 
> I couldn't change some values (f.e IDLE or ICT), while its
> "changing" flag is "y".

I would be surprised if you could change IDLE or
ICT on a SCSI disk and even more surprised if
that could be done through a bridge to an ATA
disk (as is happening in your case).

What the SAT draft is doing is instructive here. It
maps the SBC "stop" state (as in when START STOP UNIT
with start=0 is sent to a disk) to the ATA "standby"
state. Further, the SAT layer bounces subsequent media
access command (e.g. READ) and sends back a NOT READY
sense key with a asc of "initializing command required ...".
Actually if that READ had got through to the ATA disk
(e.g. sent as an ATA READ via the ATA PASS THROUGH SCSI
command) then the ATA disk would have spun up! However
a design goal of SAT is to make an ATA disk look like
a SCSI disk which once spun down need a START STOP UNIT
(start=1) command prior to subsequent media access.

And that is about it. Does anyone know of SCSI disks
that implement the power condition mode page with real
changeable fields? Also what does "idle" state mean for
a disk? [Heads parked, media spinning?]

Further, the SAT draft only outlines the partial
translation of 4 mode pages:
  - caching
  - control
  - informational exceptions control
  - read write error recovery

Notice no power condition mode page. I'm not familiar
enough with the SBP-2 standard and the corresponding
sbp2 driver but I doubt whether that mode page is
really supported. Alternatively it could be the SCSI
to ATA protocol bridge software being unhelpful.

> Would you like to explain meaning of that flag and, possibly,
> why change doesn't apply ? Maybe i'm doing or understanding
> something wrong ?

I just think trying to manipulate mode pages
for ATA devices via the current and previous
generations of USB mass storage and 1392 sbp2
chips is a lost cause. Hopefully the next
generation will have a SAT standard to guide them.

> All i want is to switch off timers (AFAIR from spcecs i've found t10.org),
> that shutdown ieee1394/usb-storage external HDD.
>  
> TIA.
>  
>  deen:/home/olecom# sdparm --set=IDLE=0 -6 /dev/sda
>     /dev/sda: WD        2500JB External   2.23  [simplified direct access device]
>  Request sense detected:  Sense key: Blank Check
>   ASC=55, ASCQ=55
>     continuing ...

Not a good start. The REQUEST SENSE ** seems to get a wild
sense key and an unknown asc/ascq combination.

>  deen:/home/olecom# sdparm -p po -6 /dev/sda
>     /dev/sda: WD        2500JB External   2.23  [simplified direct access device]
>  Request sense detected:  Sense key: Medium Error
>   ASC=55, ASCQ=55

It is not normal to get a Medium Error when accessing mode
pages. [If the disk did store mode information on the media
and could not read it, then it would probably fail its
initial self test.]

>     continuing ...
>  Power condition mode page:
>  >>> warning: mode page seems malformed, try '--flexible'

hmm, 'malformed'

>   IDLE        1  [cha: y, def:  1, sav:  1]
>   STANDBY     0  [cha: n, def:  0, sav:  0]
>   ICT       4095  [cha: y, def:4095, sav:4095]
>   SCT       4278190080  [cha: y, def:4278190080, sav:4278190080]

the SCT is 0xff000000 .

>  deen:/home/olecom#

Looks like garbage in, garbage out.

Lots of error paths were checked and nothing
died badly which indicates various drivers
are working well, so that is good.


** the initial REQUEST SENSE command used in
sdparm-0.98 has been removed in sdparm-0.99
because it broke broken software. Sadly the
major problem was with libata which doesn't
support REQUEST SENSE. If other see sdparm
version 0.98 failing on a REQUEST SENSE, please
upgrade to version 0.99 .

Doug Gilbert

  reply	other threads:[~2006-08-07 23:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-07 21:05 [sbp2] external hard disk shutdown timer olecom
2006-08-07 23:55 ` Douglas Gilbert [this message]
2006-08-08  8:04   ` Stefan Richter
2006-08-08 15:27     ` Douglas Gilbert
  -- strict thread matches above, loose matches on Subject: below --
2006-08-08 17:31 olecom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44D7D2E1.9010104@torque.net \
    --to=dougg@torque.net \
    --cc=linux-scsi@vger.kernel.org \
    --cc=olecom@mail.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.