On Wed, 8 Sep 2004 [EMAIL PROTECTED] wrote:

> Configuration:
> Distribution:Linux Fedora Core 2
> Kernel:2.6.7
> Problem occured also with the RedHat 7.3 distribution (kernel 2.4.18)
> HCD:uhci_hcd
> 
> Hi,
> I'm writing an USB driver for a specific device.
> If I terminate an IO (a read on a BULK or an interrupt pipe) by calling
> usb_unlink_urb()
> then I submit another URB, I miss some data. With an USB analyser, I can
> see a packet that is missed.

(I assume the packet was sent in response to the first URB, not the
second.)  The data will be available in the transfer_buffer for the URB
that you unlinked.  The amount of data in the buffer is
urb->actual_length.  That's true even though urb->status is -ECONNRESET or 
-ENOENT.

> The driver  IO completion call-back will never be called until the device
> send other data.

Do you mean the completion handler for the second URB?  The handler 
for the first URB will be called shortly after you unlink it.

A more interesting question is: Why do you have to unlink the URB to 
terminate the I/O transfer?  Why doesn't the transfer terminate by itself 
when the device has sent all the data it has available?

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to