Re: sdparm cannot start or stop SATA disks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux