SCSI Execute Command remote procedure at bit level

Pat LaVarre p.lavarre at IEEE.org
Thu May 27 17:35:35 PDT 2004


* From the T10 Reflector (t10 at t10.org), posted by:
* Pat LaVarre <p.lavarre at ieee.org>
*
Truth or slander, I do not know and cannot easily discover but as yet I
believe ...

> to send a response back to the HOST you need to wrap
> it in a USB wrapper thus the message (over the USB cable) you will send
> will be "USBS+STATUS" am I correct.

Yes.

a) The byte of bCSWStatus reaches the SCSI over USB host embedded in a
packet of x0D bytes, of which the first four bytes are "USBS".  I do not
know if your source code has to feed the USBS into your chip, or if your
chip injects those bytes itself.

b) Heads up, pass/fail is not all there is to status, the "residue" also
matters.

c) For the byte of bCSWStatus you choose from:

x00 Passed, analogous to Linux SAM_STAT_GOOD

x01 Failed, which is a solicitation of auto sense, analogous to Linux
SAM_STAT_CHECK_CONDITION

x02 Other, for which I do not know the jargon introduced by SAM, but
Other means failure so severe that auto sense isn't available, reset
recommended, for example a PATAPI UDMA CRC failure in the auto sense
data itself

>  I think my main problem is that we
> are dealing with a multi layered multi protocol here, containing the USB
> & SCSI protocol. So I'm was/am still a little bit confused but I'm
> getting there.

Congrats!

> USB bInterfaceSubClass = x06 or bInterfaceSubClass = x01
> (not really sure what I should use, I'm leaning towards RBC at the
> moment because I think the implementation would be simpler) would define
> what SCSI protocol to expect inside the USB wrapper.

x0E RBC looks simpler but is actually more complex.

1) I hear you will find that x0E RBC is only slightly binary
incompatible with x00 SBC, especially near "MODE SENSE".

2) I hear SCSI over FireWire hosts expect PDT = x0E RBC for talk like
HDD/ Flash, but other SCSI over whatever hosts expect x00 SBC.  All SCSI
expects PDT = x05 MMC for talk like DVD/ CD.  x00 means SBC but SBC can
mean any of x 07 04 00 and arguably x 0E RBC.

I vote you use x0E RBC as a guide to discovering what part of x00 SBC is
actually required, and then go implement that part of x00 SBC.

> > An advantage of choosing PDT x00 i.e. talking like HDD/ Flash, is that
> > the host half of the work may be written for you already.
> > 
> > Personally I have no experience of PDT x03, so I can't tell you what to
> > expect there.
> My choice of PDT 0x03 previously was obviously wrong,

I'm more difficult to talk with than some of the rest of t10.org because
nothing is obvious to me.

> I think the best
> suited PDTs are or 0x00 Direct Access device or 0x0E Simplified Direct
> Access device (RBC).

Ok.

> by x06 I meant bInterfaceSubClass = 0x06. 

Clear now thank you.
 
> > I haven't yet seen you mention what SCSI over USB host you want to
> > connect with your SCSI over USB device.  If it's Dos/ Linux/ Mac/
> > Solaris/ Windows, then you can find people massively distributing ways
> > to talk SCSI over USB already.
> Preferably all OS types, but I'm currently limited to my work machine
> which is a Win2K, but if I can get it to work with my Mac OS X I would
> be really happy with that as well.

Win 2K and Mac OS X do all talk PDT x00 SBC, x05 MMC, and x0E RBC.

If your Win 2K PC can boot from CD, then it can boot Knoppix Linux
available from such places as http://linuxiso.org/

Once you have a device name, you can pass single commands thru my
http://members.aol.com/plscsi/

Except single command pass thru doesn't work in Apple Mac OS X unless
you report PDT x05 and identify yourself as an "authoring" device, such
as DVD RAM.  (Unless, of course, you patch the Apple kernel to behave
less irrationally.)

Also setting an ordinary device name is easier in Windows if you start
with op x12 "INQUIRY" byte 1 mask x80 RMB set.  Then you get a drive
letter as soon as you can handle a few commands.  Otherwise you don't
get a drive letter until after you can accept a disk erase from
Windows.  I hear the !RMB HDD/ !RMB Flash folk know how to name such
Windows devices.  Me, I've always worked in !!RMB or in Linux where I
don't suffer that problem.

Pat LaVarre


*
* For T10 Reflector information, send a message with
* 'info t10' (no quotes) in the message body to majordomo at t10.org




More information about the T10 mailing list