On Monday 10 February 2003 16:05, Alan Stern wrote:
> On Mon, 10 Feb 2003, Duncan Sands wrote:
> > > Depending on the usage model the driver follows, this might not be
> > > true. For instance, one commonly recommended theme is for the driver to
> > > increment its module-use-count each time it submits an urb and
> > > decrement the count in the completion routine.  When this approach is
> > > used, the kernel won't allow the module to be unloaded until there are
> > > no active urbs.
> >
> > If all urbs are cancelled in the disconnect method, as they should be,
> > then increasing the module's use count like this is pointless.
>
> Not necessarily, it depends on the structure of the driver.  Increasing
> the use count in this way would prevent unloading while any urbs are in
> use, thus making it unnecessary to cancel anything in disconnect().
> (Unfortunately, that doesn't work out quite so nicely on SMP systems.)

Since disconnect can come at any time, and need not be related to
module unloading, it would still be necessary to cancel everything in
disconnect.

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