linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Mark Lord <liml@rtr.ca>, Linux IDE <linux-ide@vger.kernel.org>,
	Tejun Heo <htejun@gmail.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH] SCSI, libata: add support for ATA_16 commands	to	libata ATAPI devices
Date: Wed, 03 Jan 2007 10:45:06 -0500	[thread overview]
Message-ID: <459BCF82.5000906@garzik.org> (raw)
In-Reply-To: <1167838307.2789.12.camel@mulgrave.il.steeleye.com>

James Bottomley wrote:
> On Wed, 2007-01-03 at 00:42 -0500, Mark Lord wrote:
>> James Bottomley wrote:
>>> I don't think I quite understand what you're trying to do here.  My
>>> understanding is that ATA_12 and ATA_16 are part of the SAT layer. i.e.
>>> they're used when we're speaking SCSI to an underlying ATA device to
>>> send taskfiles.  However, ATAPI devices don't use SAT ... every SCSI
>>> command you send to an ATAPI device goes out as an ATA PACKET command
>>> without being translated.
>> ATAPI devices also implement quite a few ATA (non-packet) commands.
>> This patch gives us a way to issue them in response to SG_IO ATA passthru
>> and the existing (non working) libata HDIO_DRIVE_CMD and HDIO_DRIVE_TASK
>> ioctl calls.
> 
> I know that ... but when you send ATA_16 down to an ATAPI device via
> SG_IO  the code paths in libata don't unwrap it and send it out as a
> taskfile ... they put ATA_16 out as a packet command.

He is aware of that.  That's what his two patches address.


>> Without this patch, SCSI blocks the ATA_16 passthru attempts,
>> because it thinks the CDB is too large for the 12-byte packet protocol
>> that ATAPI devices use.  This limit (12 bytes) is totally non-applicable
>> to ATA protocol commands.
>>
>>> Is there a missing piece to this patch, where you scan the incoming
>>> commands to ATAPI devices and actually do translation for ATA_16?
>> Look at the existing libata-core.c ioctl's for HDIO_DRIVE_CMD
>> and HDIO_DRIVE_TASK, used by hdparm and others.
> 
> Those send out taskfile commands ... my point is that the SAT SCSI

No, those HDIO_xxx ioctls cause libata to send ATA_{12,16} SCSI commands 
to the SCSI simulator (which then unwraps them, and sends a taskfile).

	Jeff



  reply	other threads:[~2007-01-03 15:45 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-03  0:35 [PATCH] SCSI, libata: add support for ATA_16 commands to libata ATAPI devices Mark Lord
2007-01-03  1:40 ` James Bottomley
2007-01-03  5:42   ` Mark Lord
2007-01-03 15:31     ` James Bottomley
2007-01-03 15:45       ` Jeff Garzik [this message]
2007-01-03 15:57         ` James Bottomley
2007-01-03 17:58           ` Mark Lord
2007-01-03 19:39       ` Douglas Gilbert
2007-01-03 21:41         ` James Bottomley
2007-01-03 23:57           ` Mark Lord
2007-01-04 15:09           ` Jens Axboe
2007-01-04 15:29             ` Mark Lord
2007-01-04 15:51               ` Jens Axboe
2007-01-08  5:00         ` Luben Tuikov
     [not found] ` <200701311346.26644.liml@rtr.ca>
2007-02-01  0:33   ` [PATCH] RESEND: " Tejun Heo
2007-02-01  0:42     ` Mark Lord
2007-02-01  0:48       ` James Bottomley
2007-02-01  0:53         ` Mark Lord
2007-02-01  0:48       ` Tejun Heo
2007-02-01  1:01         ` Mark Lord
2007-02-01  8:30           ` Jeff Garzik
2007-02-01  8:28         ` Jeff Garzik
2007-02-01  8:43           ` Tejun Heo
2007-02-01  9:54             ` Jeff Garzik
2007-02-01 15:09               ` James Bottomley
2007-02-01 15:15                 ` Jeff Garzik
2007-02-01 20:21                 ` Douglas Gilbert
2007-02-01 20:30                   ` Jeff Garzik
2007-02-02  9:11                   ` Christoph Hellwig
2007-02-01  8:26       ` Jeff Garzik
2007-02-01  8:35         ` Tejun Heo
2007-02-01  9:52           ` Jeff Garzik
2007-02-01  0:44     ` James Bottomley

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=459BCF82.5000906@garzik.org \
    --to=jeff@garzik.org \
    --cc=James.Bottomley@SteelEye.com \
    --cc=htejun@gmail.com \
    --cc=liml@rtr.ca \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).