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
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html