usbatm : modprobe & rmmod

Roman Kagan rkagan at mail.ru
Wed Jan 26 07:55:12 EST 2005


  Hi Mattieu,

On Tue, Jan 25, 2005 at 08:43:57PM +0100, matthieu castet wrote:
> >No, they are unrelated.  The cleanup function is a callback registered
> >with the refcounting mechanism to be called when the last reference to
> >the instance is dropped.  The references can live beyond disconnect
> >(e.g. while the ATM device has open connections) and so should the
> >instance.
> Well, I still don't understand : how the urb could be used if the device 
> is removed ?

They can be used, you'll simply get an error from usb_submit_urb if you
try.  Otherwise you'd have to check if the disconnect has already been
called and your urbs are already freed, fighting with the races arising
from that.  Better let the USB core do this for you.

Cheers,
  Roman.



More information about the Usbatm mailing list