public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Hancock <hancockr@shaw.ca>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: robomod@news.nic.it
Subject: Re: Q: how to send ATA cmds to USB drive?
Date: Wed, 24 May 2006 17:15:58 -0600	[thread overview]
Message-ID: <4474E92E.8020403@shaw.ca> (raw)
In-Reply-To: <6fXQT-16z-11@gated-at.bofh.it>

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.

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/


       reply	other threads:[~2006-05-24 23:16 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 ` Robert Hancock [this message]
2006-05-24 23:33   ` Q: how to send ATA cmds to USB drive? Jeff Garzik
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=4474E92E.8020403@shaw.ca \
    --to=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