On Mon, 17 Nov 2003, Alex Bennee wrote:

> Hi,
> 
> I'm starting to become convinced that flaky as the transport driver may
> be it is as nothing to the devices it talks to :-(
> 
> Anyway I'm still getting intermittent problems with talking to the
> Freecom USB sticks which I'd like to understand in better detail. At
> least one of the commands (MODE_SENSE) seems to fail whenever the device
> is plugged in:
> 
> usb-storage: Command MODE_SENSE (6 bytes)
> usb-storage: 1a 00 3f 00 ff 00 00 00 00 00 00 00
> usb-storage: Bulk command S 0x43425355 T 0x6 Trg 0 LUN 0 L 255 F 128 CL
> 6
> hci_submit_urb: 122765->122766
> usb-storage: Bulk command transfer result=0
> usb-storage: usb_stor_transfer_partial(): xfer 255 bytes
> hci_submit_urb: 122767->122768
> error on received packet: cc=9,urb->status = -121
> urb                   :89fce2c0
> next                  :00000000
> dev                   :8826dc00
> pipe                  :C0008280 (type 3)
> status                :-121
> transfer_flags        :00000008
> transfer_buffer       :895ed000
> transfer_buffer_length:255
> actual_length         :12
> setup_packet          :00000000
> start_frame           :10223
> number_of_packets     :0
> interval              :0
> error_count           :0
> context               :8826db74
> complete              :c0132bc0
> usb-storage: usb_stor_bulk_msg() returned -121 xferred 12/255
> usb-storage: usb_stor_transfer_partial(): unknown error
> usb-storage: Bulk data transfer result 0x2
> 
> The cc code from my transport indicates an DataUnderrun, however I
> suspect it could be the device just give short replies. However if I
> return a bad status I assume it just gets ignored by the higher level?

Why would you assume that?  Look at the logs; usb-storage reports an 
unknown error and (if you look farther down past the part you have 
included here) you'll see that it begins an error recovery procedure.  The 
bad status definitely does _not_ get ignored.

And by the way, a short reply should not be considered an error.  It's 
normal to have short replies; there's nothing wrong with them.

> As all these commands are as I understand it meant to be SCSI commands
> encapsulated over USB I thought I'd have a closer look at the contents:
> 
> contents:0xb 0x0 0x0 0x8 0x0 0x1 0xfffffff4 0x0 0x0 0x0 0x2 0x0

Is that supposed to be the contents of the command or of the reply?  It
looks like the reply.  I assume the 0xfffffff4 is an really unsigned 0xf4
that was incorrectly printed as a signed value.

It says that the mode data (not counting the 1-byte length field) is 11
bytes, the medium-type and device-specific parameter values are 0 
(default medium type and not write-protected), there
is a single 8-byte block descriptor, the descriptor has density code 0 and 
applies to 0x1f400 blocks each of which is 0x200 bytes long.

> However I cannot find where the MODE_SENSE command is documented
> (although granted I've not read every document on the T10 site). Can
> anyone point me in the right direction?

The SCSI standards documents are not, so far as I know, freely available.  
Here is a link to a very old draft copy of the SCSI-2 standard that 
includes the information you want:

http://www.rahul.net/endl/cdaccess/t10/drafts/scsi2/scsi2.pdf

For more up-to-date and domain-specific stuff, look at

http://www.t10.org/ftp/t10/drafts/sbc/sbc-r08c.pdf

and

http://www.t10.org/ftp/t10/drafts/spc3/spc3r15.pdf

There may be later revisions of these available by now.

Alan Stern



-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to