David Brownell wrote:
>
> > 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),
> > ...
> > 3. the completion handler is _called_ and the result of usb_submit_urb
> > indicates _success_ (simulating the asynchronous case).
But should errors in root hub operations be indicated by the result of
usb_submit_urb (completion handler not called) or by the completion
handler (usb_submit_urb returns 0)? I would prefer 3 over 1 as it would
completely hide the fact that the root hub is really a special case of
hub.
> I'd agree... though I wouldn't make any exception for the ENOMEM
> and EINVAL sorts of failures.
If one reported every failure as in alternative 3 then the result of
usb_submit_urb would always be 0 so the function could be declared as
having return type void. But OOM conditions should be reported (and thus
handled) early so I made the distinction between these types of failure
and operational failures.
Regards
Stephan
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel