Here is my CBW CommandBlockWrapper for the SCSI Inquiry request.
take a look at tatOS/usb/inquiry.s and also other files in that directory.
See the /docs directory for a list of resources. I found these documents useful:
[6] "Working Draft American National Standard SCSI Block Commands (SBC-2)"
Nov 2004 and the "SCSI Primary Commands (SPC-2)"
Good luck,
TomT
http://code.google.com/p/tatos/;Command Block Wrapper for SCSI Inquiry (31 bytes)
InquiryRequest:
dd 0x43425355 ;dCBWSignature
dd 0xaabbccdd ;dCBWTag (device will copy this into CSW)
dd 0x24 ;dCBWDataTransferLength (for tdData)
db 0x80 ;bmCBWFlags 0x80=Device2Host, 00=Host2Device
db 0 ;bCBWLun
db 6 ;bCBWCBLength (of CBWCB)
;CBWCB (16 bytes) see SCSI Inquiry Command
db 0x12 ;SCSI operation code
db 0 ;SCSI reserved
db 0 ;SCSI page or operation code
db 0 ;SCSI reserved
db 0x24 ;SCSI allocation length
db 0 ;SCSI control
times 15 db 0 ;USBmass CBWCB must be 16 bytes long (we add alittle extra 0)