On Sat, May 13, 2000 at 02:25:06AM +0000, Dunlap, Randy wrote:
> Hi,
> 
> I've been making some changes for USB bandwidth
> allocation & management and came across the following
> (collected, not necessarily related) questions.
> 
> 
> 1.  For a particular urb, can a driver (erroneously)
> call usb_unlink_urb() more than one time?
> If so, what happens on the second, third, etc. calls?

It should do nothing if the call is issued on an already
killed urb (status!=-EINPROGRESS). As far I can see,
all three HCD act this way.

> 2.  Is usb_free_urb() safe?  As it is, it looks like
> it could free an urb that is in use.
> Should it call usb_unlink_urb() before calling
> kfree()?
> If the urb is in use, what happens now?
> Just a quick, hard system crash/hang?

True, usb_free_urb is not safe if the urb is in use.
One way to handle this would be the automatic unlink, the
other the ignoring of this request. Both have bad sideeffects,
I don't what is better for the driver...
-- 
         Georg Acher, [EMAIL PROTECTED]         
         http://www.in.tum.de/~acher/
          "Oh no, not again !" The bowl of petunias          

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to