On Thu, 29 Jun 2006, Franck Bui-Huu wrote:
> BTW, I updated the patch and I think it fixes a small issue. With the
> previous code, if no timeout happened and the HCD set the URB's status
> to ECONNRESET value, the code assumed that a timeout had occured.
> + if (!wait_for_completion_timeout(&done, expire)) {
> +
> + dev_dbg(&urb->dev->dev,
> + "%s timed out on ep%d%s len=%d/%d\n",
> + current->comm,
> + usb_pipeendpoint(urb->pipe),
> + usb_pipein(urb->pipe) ? "in" : "out",
> + urb->actual_length,
> + urb->transfer_buffer_length);
> +
> + usb_kill_urb(urb);
> + status = urb->actual_length > 0 ? 0 : -ETIMEDOUT;
I think it makes more sense here to do:
status = (urb->status == -ENOENT ? -ETIMEDOUT : urb->status);
The idea being that if the completion raced the timeout you should do your
best to report what actually happened. After all, it is possible that
urb->transfer_length was 0 (so urb->actual_lenth is also 0) and it
completed normally.
Alan Stern
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel