Re: Question regarding short transfers

David Brownell <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Tuesday 22 May 2007, Alan Stern wrote:
> 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.

Sorry, you're right.  I was thinking this was an extension
of question #1...

In patent-ese, #2 was independent, not dependent.  ;)


-------------------------------------------------------------------------
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/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.