On Fri, Oct 21, 2005, Chris Frey <cdfrey@...> wrote:
> I have an instance where sending a bulk write to my device causes the
> library to "hang" on the select() call in usbi_poll_events, which causes
> the finish_io() in usb_bulk_write() to never return.
> I'm pretty sure this is due to the device not sending a response. In
> my USB capture, I see 2 writes going to different endpoints, and then
> the device responding in reverse order.
> My question is, should the timeout value in usb_bulk_write affect this
> apparent hanging?
It should, but looking at the code right now, it doesn't.
> I should probably be using the async API for this, but I'm curious about
> the intentions of the timeout.
The intent is to fail an async operation if there is no response within
the timeout period.
The Linux implementation for 1.0 doesn't actually do anything with the
timeout value right now and that's a bug.
I'm working on fixing this right now and I'll send a followup when I
have a fix checked in.