Re: the proper value of timeout of usb_control_msg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi alan:

2011/1/1 Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>:
> On Fri, 31 Dec 2010, vichy wrote:
>
>> > But you don't need a detailed comparison to find out which URB timed
>> > out.  You can tell by looking at the status code in the URB's
>> > completion line; a timeout will set the status to -2.
>>
>> I can see -2 on the log of usbmon right now.
>> And it seems from usbmon_urb_complete
>> but if the timeout happen, which function call usbmon_urb_complete?
>
> usb_hcd_giveback_urb calls usbmon_urb_complete.  This is always true,
> regardless of whether the URB times out.

after tracing the source code, I found usb_hcd_giveback_urb will be
called in ehci_urb_done when interrupt happen and that is the normal
path.

But what makes me confuse is when timeout happen such as
wait_for_completion_timeout in usb_start_wait_urb, which function will
call usb_hcd_giveback_urb and bring -2 to it originally I guess maybe
the ehci_watchdog, but I think it is not, because the function has no
idea of the time out parameter, right?

BTW, under what circumstance the status of urb will be -150?
I grep include/linux and didn't find amy error number which is -150.
appreciate your kind help :)
vichy
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux