On Mon, 28 Feb 2005, David Brownell wrote:

> On Sunday 27 February 2005 5:16 pm, Gerd v. Egidy wrote:
> > 
> >> usb-storage: usb_stor_bulk_transfer_sglist: xfer 131072 bytes, 17 entries
> > usb-storage: Status code -121; transferred 130061/131072
> > usb-storage: -- short read transfer
> > usb-storage: Bulk data transfer result 0x1
> > usb-storage: Attempting to get CSW...
> > usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
> > usb-storage: command_abort called
> > usb-storage: usb_stor_stop_transport called
> > usb-storage: -- cancelling URB
> > usb-storage: Status code -104; transferred 0/13
> > usb-storage: -- transfer cancelled
> > usb-storage: Bulk status result = 4
> > usb-storage: -- command was aborted
> 
> That's interesting.  Basically the device sent 13 bytes less than 128KB.

Actually it sent 13 bytes more than 127 KB.

> And 13 bytes is the sise of a CSW ... as if it has only 128KB of buffer
> space, and 13 bytes at the end is tied up for the CSW.  But absolutely
> unlike any failure that the EHCI driver would trigger; those would all
> kick in at 512 byte boundaries.

It certainly seems likely that the extra 13 bytes is somehow related to 
the size of a CSW.  But numerology is never very convincing.  If 128 KB 
was the limit, why wouldn't the device send 255 512-byte packets (i.e., 
127.5 KB) before the short 13-byte packet?

> Maybe it'd be happier with a slightly shorter read?

Could be.  Gerd, have you changed the max_sectors value associated with 
the device?  The default value used by usb-storage is 240, which 
corresponds to a maximum transfer length of 120 KB.  But your log shows 
attempted transfers of length 128 KB -- perhaps that sometimes causes 
trouble.  Hmmm...  Maybe the block layer isn't honoring max_sectors any 
more...

Incidentally, I filed a technical support request with Cypress 
Semiconductors about this.  Maybe they'll be able to help...

Alan Stern



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to