Hi I have two questions regarding short transfers. My questions are best illustrated by a scenario:
Lets say the Hosts Mass Storage driver wants to READ 12K: I believe that the Host Controller driver (e.g. ehci_hcd) might see something like this coming from usbcore: 1) BULK OUT urb (31 bytes) [Contains READ10 command] 2) BULK IN urb (4K) [data] 3) BULK IN urb (8K) [data] 4) BULK IN urb (13 bytes) [status] I have two questions regarding what happens when the transfer gets terminated early: 1) What happens if the device terminates the transfer after the 4KB (with a zero-length packet)? Does the HC driver... - set status to 0 in the 4K urb (& actual_length=4096) and - flush all other queued urbs for that EP (in this case the 8K urb) by completing them with an error status ? If so what is the status ? 2) What happens if the device terminates the transfer during the 4KB (after say 3700 bytes received, with a short packet)? Thus: urb->transfer_buffer_length = 4096 urb->actual_length = 3700 I believe that the HC driver should do the following test: if( (urb->actual_length < urb->transfer_buffer_length) && (urb->transfer_flags & URB_SHORT_NOT_OK) ) urb->status = -EREMOTEIO; So if URB_SHORT_NOT_OK is set then -EREMOTEIO will be returned And if URB_SHORT_NOT_OK is not set the 0 will be returned. Is this correct ? Again I assume that the 8K urb should be completed immediately ? If so with what status ? I'm having trouble understand the EHCI code; In the EHCI driver where are these situation handled ? qh_completions() ? Thank you for your time regards dom ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel