Q: how to send ATA cmds to USB drive?

Herbert Rosmanith
2006-05-24T09:27:59Z

good day,

I have a question concerning sending arbitrary ATA commands to an USB
drive.

Currently, I have a particular application which sends special ATA commands
to an IDE drive using IDE_TASKFILE. So far, this works pretty well.

But now I also have to support USB harddisks from the same company.
The USB harddisk uses the same set of ATA commands as the IDE harddisk,
well, at least that's what I suppose.

How do I send ATA commands to this USB drive? I suppose this would be
done via SG_IO (the drive is recognised by linux as usb-storage, of
course), but how exactly does this have to be done? I have already
used SG_IO before to send some MMC commands to cdvd-drives, but I
don't know how to send ATA (such as those from T13) commands with this
interface.

Do you have any kind of advice?

kind regards,
herbert rosmanith