From: Tejun Heo <htejun@gmail.com>
To: dougg@torque.net
Cc: Jeff Garzik <jgarzik@pobox.com>, linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata: fix ATA passthrough handling for ATAPI devices
Date: Mon, 23 Oct 2006 11:55:35 +0900 [thread overview]
Message-ID: <453C2F27.9030302@gmail.com> (raw)
In-Reply-To: <453AA91D.8060803@torque.net>
Douglas Gilbert wrote:
>> 1) The kernel must prevent 16-byte non-passthru commands from reaching
>> 12-byte-only ATAPI devices.
>
> I would prefer to see the command sent through until
> it hits a transport that cannot carry a 16 byte cdb.
> That transport may be in an external enclosure, or
> the limitation may have been removed.
The host max CDB len has never been a proper protection against illegal
CDB length. Think about PATA, ata_piix SLAVE_POSS or PMP cases sharing
the host w/ ATA devices. Max CDB len is always 16 in such cases whether
an ATAPI device supports 12 or 16 byte CDB. Also, max CDB len doesn't
protect against smaller CDB (12 bytes) when the device supports 16 byte
CDBs.
So, for some cases, we had protection and in many others we didn't.
We've always depended on applications sending correctly sized CDBs and
ATAPI devices aborting wrong sized CDBs.
I'm not sure whether the protection is necessary, but if it is, we can
do the protection *properly* by moving cdb restriction to lower level
such that it's applied per-device not per-host. This also solves the
16byte passthrough problem.
IMHO, this issues is separate from SAT passthrough and needs
improvements regardless.
>> 2) Existing in-the-field solutions that issue commands such as BLANK or
>> a vendor-reserved 0x85 opcode must continue working, without recompile.
>
> Opcodes 0x85 and 0xa1 are not vendor reserved. They have
> been reserved for t10.org use since SCSI-2. Other SCSI
> opcode ranges are set aside for vendor use.
> The BLANK problems remains.
Ah.. I haven't thought about opcode clash. I'm all ears on this. Just
tell me what to do, I'll go and implement it.
Thanks.
--
tejun
next prev parent reply other threads:[~2006-10-23 2:55 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 [this message]
2006-10-23 13:58 ` Douglas Gilbert
2006-11-01 2:03 ` Jeff Garzik
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=453C2F27.9030302@gmail.com \
--to=htejun@gmail.com \
--cc=dougg@torque.net \
--cc=jgarzik@pobox.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 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).