On Tuesday 24 September 2002 11:32 pm, David Brownell wrote:
> Oliver Neukum wrote:
> > Am Dienstag, 17. September 2002 19:44 schrieb David Brownell:
> >>>If I unlink my urbs upon disconnect synchronously and resubmit my urbs
> >>>in the completon handler, is there a race condition between the two?
> >>
> >>Don't EVER submit another urb after you've gotten a disconnect()
> >>callback -- that'd be a bug in your driver.  Your disconnect logic
> >>needs to arrange (first thing!) that no more urbs get submitted.
> >

> > There's quite subtle a problem here.
> > In principle disconnect() is not SMP-safe at present by design.
>
> The "not SMP-safe" seems more related to module unloading than
> to the semantics of disconnect().  Don't scare the newbie ... ;)
>
> And it's worth emphasizing that it doesn't affect the truth of
> what I said:  submitting after disconnect() is called is Wrong.
>

If this is the case, the first line of every disconnect for every driver 
should be:
spin_lock_irqsave(desc->killlock, flags);



Anton Wilson


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to