On Sun, 29 May 2005, Arlet Ottens wrote:

> Hello,
> 
> While trying to write a linux driver for my USB device on kernel 2.4.30, I
> noticed that doing an usb_unlink_urb on a bulk IN endpoint, and then
> submitting a new urb later, causes the next packet of data on that
> endpoint to be lost. I see the packet on my USB bus analyzer, but I don't
> get the completion callback in the driver.
> 
> It appears to be caused by the fact that Linux has performed the data
> toggle on that endpoint even though there was never any data received.
> When the packet comes in, it decides that it has the wrong toggle bit, and
> discards it.
> 
> I can work around this by replacing the usb_unlink_urb() by the following
> sequence:
> 
>       usb_unlink_urb()
>       usb_submit_urb()
>       usb_unlink_urb()
> 
> That works, but it's not very elegant.

You didn't say which driver you were using.  Presumably it's the 
"alternate" (or "JE") uhci driver.

The corresponding problem with the 2.6 uhci-hcd driver has been known and 
was fixed last year.  See

http://marc.theaimsgroup.com/?l=linux-usb-devel&m=109545628228560&w=2

If you're interested you could back-port the fix to 2.4.

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
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