Johannes Erdfelt wrote: > > uhci.c would call the completion callback when the call to submit_urb > failed. This is a rare situation. > > This patch only calls the completion handler if the URB successfully > completed immediately (as in the case of talking to the virtual root > hub). [patch omitted]
usb_submit_urb should really have well defined semantics for failures: 1. the completion handler is _not called_ and the result of usb_submit_urb indicates _failure_ (the way uhci handles it now), 2. the completion handler is _called_ and the result of usb_submit_urb indicates _failure_ (the way uhci handled it before), 3. the completion handler is _called_ and the result of usb_submit_urb indicates _success_ (simulating the asynchronous case). the redundant failure reporting of alternative 2 should IMO be avoided, alternative 1 is obviously the fastest, in alternative 3 the return code of usb_submit_urb would always be 0 (success) which would leave only a single piece of code (the completion handler) for urb status handling. Any opinions? _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
