I was curious about the reasoning behind this decision and how to fix an
issue that came up because of it.

Here is the issue found:
1) Some USB storage peripherals identify themselves as following scsi spec 0
(i.e. "we don't follow a spec, we just kinda magically work with some of the
commands formatted in a scsi sort of way").  There are various reasons for
this, such as they don't follow all of scsi3 and just support enough basic
commands like reads and writes.
2) The USB storage stack auto-promotes these spec 0 devices to spec 2
3) The SCSI stack, now thinking these are spec 2 devices, maskes in LUN info
into cdb[ 1 ]
4) Some raw commands (vendor specific and others) on these USB storage
devices don't work because cdb[ 1 ] has those 3 bits changed.

A more concrete example:
1) USB storage device supports SCSI-ATA cdb passthru (SAT spec at
www.t10.org) but reports it follows spec 0
2) Anytime you issue a passthru cdb, cdb[ 1 ] gets mangled, corrupting bits
that are inmportant in the cdb


I have some time to help in solving the above.  But what do people think the
solution should be?

Here are some ideas floating in my head:
1) Promote the scsi0 device to scsi3 (instead of scsi2) since it most likely
follows scsi3 forms of commands that it happens to support
2) Leave the scsi0 device as scsi0, and make sure the scsi stack is aware of
scsi0 devices (i.e. don't stick LUN info into cdb[ 1 ] )

(1) Is easy to do, but is it going to cause other issues?  I'd imagine any
*usb storage* device that reports scsi0 really implements the scsi3 form of
the commands that it happens to support.
(2) Is more invasive, but is probably more of a correct solution.  This will
require a larger effort involving multiple groups coordinating the efforts.

Any thoughts?

Thanks for your time,
Tim Thelin


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to