Oliver Neukum wrote:
It's never a NOP unless the unlink somehow completed already.
As I said: using async unlinks because I want to see all the
synchronization right here, clearly visible, no hidden magic.
OK, maybe I am dense, but this doesn't make sense.
Let's have another closer look:
+ /* abnormal: timed out, so force completion via unlink */
+ } else {
+ status = usb_unlink_urb(urb);
+ switch (status) {
+ case -EINPROGRESS: /* normal */
+ case -EBUSY: /* already completing */
+ dev_err(&urb->dev->dev, "control/bulk timeout\n");
+ break;
+ default:
+ /* shouldn't happen */
+ dev_err(&urb->dev->dev, "c/b unlink err %d\n", status);
+ break;
}
- } else
- status = urb->status;
+ wait_for_completion(&done);
What for? You already waited with schedule_timeout.
For the urb to complete. The schedule_timeout() returned without
that completion. We only forced the completion path to start, with
the unlink; if it wasn't already starting (maybe on another CPU).
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel