public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* sdparm cannot start or stop SATA disks
@ 2005-07-29 10:47 Douglas Gilbert
  2005-07-29 16:02 ` Mogens Valentin
  2005-07-29 16:11 ` Jeff Garzik
  0 siblings, 2 replies; 7+ messages in thread
From: Douglas Gilbert @ 2005-07-29 10:47 UTC (permalink / raw)
  To: linux-scsi

Putting this post on this list might head off
more (private) emails on this subject.

sdparm uses the START STOP UNIT SCSI command to start
and stop (spin up and spin down) SCSI devices.
Currently libata does not implement that SCSI command.
[Hopefully Jeff contradicts me.]

Has anybody seen a USB or 1394 enclosure that implements
START STOP UNIT? [The command is defined in SBC, MMC and
RBC.]

Doug Gilbert


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: sdparm cannot start or stop SATA disks
  2005-07-29 10:47 sdparm cannot start or stop SATA disks Douglas Gilbert
@ 2005-07-29 16:02 ` Mogens Valentin
  2005-07-29 16:11 ` Jeff Garzik
  1 sibling, 0 replies; 7+ messages in thread
From: Mogens Valentin @ 2005-07-29 16:02 UTC (permalink / raw)
  To: linux-scsi; +Cc: dougg

Douglas Gilbert wrote:
> Putting this post on this list might head off
> more (private) emails on this subject.
> 
> sdparm uses the START STOP UNIT SCSI command to start
> and stop (spin up and spin down) SCSI devices.
> Currently libata does not implement that SCSI command.
> [Hopefully Jeff contradicts me.]
> 
> Has anybody seen a USB or 1394 enclosure that implements
> START STOP UNIT? [The command is defined in SBC, MMC and
> RBC.]

Hi Douglas,
After our previous discussion on USB/Firewire start/stop, I asked on our 
dk LUG for info on external interfaces, but found none that seems to 
implement the needed SCSI functionality.
Too bad, would've been great being able to spin an external drive 
down/up as needed.

I think I read somewhere that one ATA disk (HItachi og Fujitsu) can do 
something similar automatically (i.e. adhering to a timeout), once 
configured to do so, using MS-based utils.
Dunno if those/similar are available for *nix.

-- 
Kind regards,
Mogens Valentin


2.6.12 rocks. I love the Conservative governor (not Arnold)..
   -- bird603568, on linuxquestions.org


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: sdparm cannot start or stop SATA disks
  2005-07-29 10:47 sdparm cannot start or stop SATA disks Douglas Gilbert
  2005-07-29 16:02 ` Mogens Valentin
@ 2005-07-29 16:11 ` Jeff Garzik
  2005-07-30  3:06   ` Douglas Gilbert
  2005-07-30  3:25   ` Douglas Gilbert
  1 sibling, 2 replies; 7+ messages in thread
From: Jeff Garzik @ 2005-07-29 16:11 UTC (permalink / raw)
  To: dougg; +Cc: linux-scsi

Douglas Gilbert wrote:
> sdparm uses the START STOP UNIT SCSI command to start
> and stop (spin up and spin down) SCSI devices.
> Currently libata does not implement that SCSI command.
> [Hopefully Jeff contradicts me.]

Correct.

Someone should submit a libata patch for this!

	Jeff



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: sdparm cannot start or stop SATA disks
  2005-07-29 16:11 ` Jeff Garzik
@ 2005-07-30  3:06   ` Douglas Gilbert
  2005-07-30  3:56     ` Jeff Garzik
  2005-07-30  3:25   ` Douglas Gilbert
  1 sibling, 1 reply; 7+ messages in thread
From: Douglas Gilbert @ 2005-07-30  3:06 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-scsi

Jeff Garzik wrote:
> Douglas Gilbert wrote:
> 
>> sdparm uses the START STOP UNIT SCSI command to start
>> and stop (spin up and spin down) SCSI devices.
>> Currently libata does not implement that SCSI command.
>> [Hopefully Jeff contradicts me.]
> 
> 
> Correct.
> 
> Someone should submit a libata patch for this!

Jeff,
I could have a go at the SCSI half of it. According to
SAT, START STOP UNIT should only be allowed for non-packet
ATA devices. I assume your SATAPI code will the bypass
libata-scsi.c SAT layer.

SAT suggests libata should issue a ATA STANDBY (sector=0)
to "stop" the device. I can't see the STANDBY command (0xE2)
defined anywhere in libata or the ide subsystem (or their
headers).

The action to start the SATA device depends on the power
mode of the SATA device:
   - SLEEP: send a hardware or software reset: that should
     get it to ACTIVE or STANDBY mode
   - STANDBY or IDLE: send a (READ) VERIFY (sector=0) ATA
     to the command
   - ACTIVE: I assume this would be a nop

The START STOP UNIT SCSI command also has an "IMMED"iate
bit. That could just be ignored initially.

Is half a patch any use?

Doug Gilbert



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: sdparm cannot start or stop SATA disks
  2005-07-29 16:11 ` Jeff Garzik
  2005-07-30  3:06   ` Douglas Gilbert
@ 2005-07-30  3:25   ` Douglas Gilbert
  2005-07-30  3:54     ` Jeff Garzik
  1 sibling, 1 reply; 7+ messages in thread
From: Douglas Gilbert @ 2005-07-30  3:25 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-scsi

Jeff Garzik wrote:
> Douglas Gilbert wrote:
> 
>> sdparm uses the START STOP UNIT SCSI command to start
>> and stop (spin up and spin down) SCSI devices.
>> Currently libata does not implement that SCSI command.
>> [Hopefully Jeff contradicts me.]
> 
> 
> Correct.
> 
> Someone should submit a libata patch for this!

Jeff,
A further thought about implementing the START STOP
UNIT SCSI command in libata: the TEST UNIT READY
SCSI command should become more than just a no-op.

Additional sense code 4 ("Logical unit not ready, ...")
seems to have a special for SAS (including SAS's ability
to hold a SATA disk spun down at power on):
ASC/ASCQ=[0x4,0x11]  "Logical unit not ready, notify
(enable spinup) required".

Doug Gilbert


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: sdparm cannot start or stop SATA disks
  2005-07-30  3:25   ` Douglas Gilbert
@ 2005-07-30  3:54     ` Jeff Garzik
  0 siblings, 0 replies; 7+ messages in thread
From: Jeff Garzik @ 2005-07-30  3:54 UTC (permalink / raw)
  To: dougg; +Cc: linux-scsi

Douglas Gilbert wrote:
> A further thought about implementing the START STOP
> UNIT SCSI command in libata: the TEST UNIT READY
> SCSI command should become more than just a no-op.

Correct.

	Jeff



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: sdparm cannot start or stop SATA disks
  2005-07-30  3:06   ` Douglas Gilbert
@ 2005-07-30  3:56     ` Jeff Garzik
  0 siblings, 0 replies; 7+ messages in thread
From: Jeff Garzik @ 2005-07-30  3:56 UTC (permalink / raw)
  To: dougg; +Cc: linux-scsi

Douglas Gilbert wrote:
> I could have a go at the SCSI half of it. According to
> SAT, START STOP UNIT should only be allowed for non-packet
> ATA devices. I assume your SATAPI code will the bypass
> libata-scsi.c SAT layer.

Mostly.  There is still a few translation bits in there.  99% bypass, 
not 100%.


> SAT suggests libata should issue a ATA STANDBY (sector=0)
> to "stop" the device. I can't see the STANDBY command (0xE2)
> defined anywhere in libata or the ide subsystem (or their
> headers).

I'm sure you're capable of adding an enum to linux/ata.h :)


> The action to start the SATA device depends on the power
> mode of the SATA device:
>   - SLEEP: send a hardware or software reset: that should
>     get it to ACTIVE or STANDBY mode
>   - STANDBY or IDLE: send a (READ) VERIFY (sector=0) ATA
>     to the command
>   - ACTIVE: I assume this would be a nop
> 
> The START STOP UNIT SCSI command also has an "IMMED"iate
> bit. That could just be ignored initially.
> 
> Is half a patch any use?

Sure.

	Jeff


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-07-30  3:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-29 10:47 sdparm cannot start or stop SATA disks Douglas Gilbert
2005-07-29 16:02 ` Mogens Valentin
2005-07-29 16:11 ` Jeff Garzik
2005-07-30  3:06   ` Douglas Gilbert
2005-07-30  3:56     ` Jeff Garzik
2005-07-30  3:25   ` Douglas Gilbert
2005-07-30  3:54     ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox