On Thu, 19 Aug 2004, Wolfgang Mües wrote:

> Hello,
> 
> in message.c, inside usb_start_wait_urb(), I found:
> 
>               if (timeout > 0) {
>                       init_timer(&timer);
>                       timer.expires = jiffies + timeout;
> 
> (this is Linux 2.6.5 from Suse 9.1, btw).
> 
> I want to know why there is a special timeout handling needed?
> From usb.h, I know that urb->timeout is a valid input parameter for all 
> types of urbs, regardless of synchronous or asynchronous submitting.
> So when the timeout expires, the hcd has to call the completion function
> anyway?
> 
> best regards
> Wolfgang Mües

The answer is simple: urb->timeout is ignored by all host controller 
drivers except uhci-hcd.  In other words, the kernel doesn't obey the 
specification in usb.h.

Ideally, the code for timing out of URBs should be removed from the UHCI 
driver and put into usbcore, where it could work with any host controller.  
Once that's done there will be no need for the special timeout code in 
usb_start_wait_urb().

Would you like to submit a patch to take care of this?

Alan Stern



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to