From: Jeff Garzik <jeff@garzik.org>
To: Robert Hancock <hancockr@shaw.ca>
Cc: linux-kernel <linux-kernel@vger.kernel.org>, robomod@news.nic.it
Subject: Re: Q: how to send ATA cmds to USB drive?
Date: Wed, 24 May 2006 19:33:30 -0400 [thread overview]
Message-ID: <4474ED4A.9090703@garzik.org> (raw)
In-Reply-To: <4474E92E.8020403@shaw.ca>
Robert Hancock wrote:
> Herbert Rosmanith wrote:
>> 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.
>
> Short answer is you likely can't. The USB-to-IDE bridge pretty much
> entirely hides the fact that it's an IDE drive behind it, from the
> host's viewpoint it looks pretty much like SCSI. Maybe if you sent SCSI
> commands to the device it would translate them into the correct ATA
> commands, depending on what exactly you're doing, but that's entirely
> dependent on the bridge chip in question and I would guess most of them
> don't support such fancy operations.
AFAIK most are not really pure bridges, but really microcontrollers
running a tiny firmware. So there is a non-zero chance of there being
an 'ata passthrough' SCSI command.
I would try to the official ATA_12 and ATA_16 SCSI commands first, to
see if they do something useful.
Jeff
next prev parent reply other threads:[~2006-05-24 23:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <6fXQT-16z-11@gated-at.bofh.it>
2006-05-24 23:15 ` Q: how to send ATA cmds to USB drive? Robert Hancock
2006-05-24 23:33 ` Jeff Garzik [this message]
2006-05-24 9:22 Herbert Rosmanith
2006-05-24 11:22 ` Alan Cox
2006-06-12 9:22 ` Herbert Rosmanith
2006-06-12 10:02 ` Herbert Rosmanith
2006-06-12 10:26 ` Herbert Rosmanith
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=4474ED4A.9090703@garzik.org \
--to=jeff@garzik.org \
--cc=hancockr@shaw.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=robomod@news.nic.it \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox