On Tue, 22 May 2007, David Brownell wrote: > > > 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 ? > > > > Yes. The same thing would happen to the 8K URB in your first question. > > > > > Again I assume that the 8K urb should be completed immediately ? > > > If so with what status ? > > > > No. The 4K URB's completion handler would see the -EREMOTEIO error and > > TYPO -- 8K, not 4K ...
Look again -- the question assumes that the first 4K URB comes up short and then asks what would happen to the 8K URB. Alan Stern ------------------------------------------------------------------------- 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