Skip to contentSkip to conversation

SG_IO and HDIO_DRIVE_TASKFILE issue

DISCUSSION Kantor Zsolt 2 participants 2 messages Sep 14, 2007 libata

lore
Share & tools
lore
#0 lore raw

Can be executed a SG_IO command for a ATA hard drive ? because I have tried everything. I have deeply studied the hdparm (version 7.7) source code and I came to realize that ATA commands like setting the acoustic value, setting the drive write-caching, identify device can not be executed with the SG_IO, so after hdparm tries with SG_IO which can't be executed jumps with a goto to the legacy command (HDIO_DRIVE_CMD) to execute the required task. And I also know that libata don't include support for the HDIO_DRIVE_TASKFILE command, so my question is how can I have full control over a hard drive because for that you must to use either HDIO_DRIVE_TASKFILE but that is not supported or SG_IO which is not working like HDIO_DRIVE_TASKFILE

      ____________________________________________________________________________________

Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings, and more!
http://tv.yahoo.com/collections/3658

#1 lore raw
Quoted 1 line · Kantor Zsolt

Can be executed a SG_IO command for a ATA hard drive ? because I have tried everything. I have

Yes.

Quoted 1 line

supported or SG_IO which is not working like HDIO_DRIVE_TASKFILE

SG_IO requires a vastly different format than HDIO_DRIVE_TASKFILE. Read the sg documentation, and then reference SAT (http://www.t10.org/) for the definitions of ATA(12) and ATA(16) commands.

Jeff