On Sun, 21 Sep 2003, Matthew Dharm wrote:
> 
> > usb-storage: queuecommand called
> > usb-storage: *** thread awakened.
> > usb-storage: Command READ_CAPACITY (10 bytes)
> > 
> > SCSI device sda: 2000880 512-byte hdwr sectors (1024 MB)
> 
> Normal READ_CAPACITY -- is that size correct?

Yes. I've got a camera that takes 7MB raw images. Big CF cards are a good 
idea.

> > usb-storage: queuecommand called
> > usb-storage: *** thread awakened.
> > usb-storage: Command MODE_SENSE_10 (10 bytes)
> > usb-storage:  5a 00 3f 00 00 00 00 00 08 00
> > 
> > sda: Write Protect is off
> > sda: Mode Sense: 06 00 00 00
> 
> MODE_SENSE_10 for all pages (0x3f) worked, which sometimes I think is a
> small miracle.

Hey, I've found the current 2.6.x SCSI layer to be pretty robust, 
actually. 

> > usb-storage: queuecommand called
> > usb-storage: *** thread awakened.
> > usb-storage: Command MODE_SENSE_10 (10 bytes)
> > usb-storage:  5a 00 08 00 00 00 00 00 08 00
> 
> Odd... why do we ask for the first 8 bytes of page 8?  The header alone is
> 8 bytes.... anyway, the response looks good.

It tries to read the cache type. It tries to read the header first, in 
order to figure out how much of page 8 it can read. The next command will 
read the header, up to a maximum of 128 bytes.

That 128-byte maximum is strange, since we actually have a buffer of at 
least 512 bytes for it, but whatever.. The same device definitely can 
handle this in EHCI mode.

I'll try to change that max size thing (maybe it really always wants to 
transfer just the header, or then the full page?), but regardless it looks 
like OHCI is a bit fragile.

> > usb-storage: queuecommand called
> > usb-storage: *** thread awakened.
> > usb-storage: Command MODE_SENSE_10 (10 bytes)
> > usb-storage:  5a 00 08 00 00 00 00 00 80 00
> > usb-storage: Bulk Command S 0x43425355 T 0x7 L 128 F 128 Trg 0 LUN 0 CL 10
> > usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
> > usb-storage: Status code 0; transferred 31/31
> > usb-storage: -- transfer complete
> > usb-storage: Bulk command transfer result=0
> > usb-storage: usb_stor_bulk_transfer_buf: xfer 128 bytes
> > usb-storage: Status code -75; transferred 64/128
> > usb-storage: -- babble
> > usb-storage: Bulk data transfer result 0x3
> 
> The last 3 lines are the first sign of trouble.  As previously discussed, I
> don't see how a BABBLE error here is possible from a technical point of
> view.

Maybe the device wants to send more than 128 bytes. And maybe EHCI/UHCI
just handles that error case more gracefully (ignoring the extra babble?).

> > usb-storage: Attempting to get CSW...
> > usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
> > usb-storage: Status code 0; transferred 0/13
> > usb-storage: -- short transfer
> > usb-storage: Bulk status result = 1
> 
> More strangeness -- the device ACKed a transfer with a 0-byte packet?
> That's very strange....

Maybe it's still the end of the previous packet.

David, any ideas? What does OHCI do if a buggy device sends more data than
the controller expects/wants?

                Linus



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to