On Saturday 11 January 2003 00:32, David Brownell wrote:
> Oliver Neukum wrote:
> > Am Freitag, 10. Januar 2003 22:16 schrieb Duncan Sands:
> >>Hi Oliver, I decided to see how other drivers deal with this
> >> usb_unlink_urb issue.  The first thing I looked was devio.c.  And guess
> >> what, it looks like it assumes that the completion handler has completed
> >> by the time usb_unlink_urb finishes:
> >>
> >>...
>
> Unlinking is tricky, and my understanding of the current rules are:
>
> - For a successful synchronous unlink, the completion handler did fire
>    before the unlink call returned.  Easily proven for HCDs that go through
>    the "hcd.c" logic (*), otherwise you have to take it on faith. (And
>    some older HCD code might bugs here, like not reporting completions.)

Excellent!  So why not add some code at the end of usb_unlink_urb that
polls the urb state (i.e. yield()s) until it is clear that the completion handler
has finished?  Is the problem that the urb could be resubmited in the
completion handler?

All the best,

Duncan.


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to