From: Jeff Garzik <jgarzik@pobox.com>
To: Tejun Heo <htejun@gmail.com>
Cc: linux-ide@vger.kernel.org, dougg@torque.net
Subject: Re: [PATCH] libata: fix ATA passthrough handling for ATAPI devices
Date: Tue, 31 Oct 2006 21:03:06 -0500 [thread overview]
Message-ID: <4548005A.4000605@pobox.com> (raw)
In-Reply-To: <20061020050948.GF13677@htj.dyndns.org>
Tejun Heo wrote:
> libata used to pass all SCSI commands directly to ATAPI devices.
> However, this is incorrect for ATA passthrough commands as they must
> be handled by the SAT layer in libata. Also, regardless of the
> attached ATAPI device's supported packet length, SAT says that both
> flavors of passthrough commands (ATA12 and ATA16) should work.
>
> This patch makes the following changes to fix ATA passthrough handling
> for ATAPI devices.
>
> * implement atapi_get_xlat_func() and make libata handle ATA12 and
> ATA16 in SAT layer instead of passing it directly to the target
> device even if the device is ATAPI.
>
> * Always allow 16byte CDBs for ATAPI devices. This makes
> ata_set_port_max_cmd_len() unnecessary and dev->cdb_len meaningless
> for ATA devices. Both are stripped away. Note that this doesn't
> breach error checking in any substantial way. shost->max_cmd_len
> has never beena ble to properly protect CDB length violation anyway.
>
> This problem has been spotted by Doublas Gilbert <dougg@torque.net>.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> Cc: Douglas Gilbert <dougg@torque.net>
Resuming from the thread:
* Regarding CDB length: DEPENDING ON IMPLEMENTATION DETAILS AND HOT
PATH IMPACT, I think Douglas's comment about CDB lengths is fair: we
could unconditionally set the limit to 16 bytes, and then filter out
16-byte CDBs at a lower level if the ATAPI device doesn't support
16-byte CDBs.
* We need a better solution for the duplicate opcode.
prev parent reply other threads:[~2006-11-01 2:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-20 5:09 [PATCH] libata: fix ATA passthrough handling for ATAPI devices Tejun Heo
2006-10-21 19:16 ` Jeff Garzik
2006-10-21 20:00 ` Douglas Gilbert
2006-10-21 20:13 ` Jeff Garzik
2006-10-21 21:18 ` Douglas Gilbert
2006-10-21 21:40 ` Jeff Garzik
2006-10-21 23:11 ` Douglas Gilbert
2006-10-23 2:55 ` Tejun Heo
2006-10-23 13:58 ` Douglas Gilbert
2006-11-01 2:03 ` Jeff Garzik [this message]
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=4548005A.4000605@pobox.com \
--to=jgarzik@pobox.com \
--cc=dougg@torque.net \
--cc=htejun@gmail.com \
--cc=linux-ide@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.