On Wed, Feb 19, 2003 at 08:28:57PM -0500, Johannes Erdfelt wrote:
> > You've said that if a device is disconnected, it's urbs will eventually
> > timeout, right?  So everything should be fine, given what I say below...
> 
> Actually, not in every case. If the driver was unloaded because the
> sysadmin wanted it unloaded, then the device could still be present and
> won't be forced into error by the HC.

Yeah, but I'm not worried to much about oopes on forced unloading, you
get what you deserve in that case :)

> You'd need to set urb->timeout, but that wouldn't be a good idea for
> URBs that stay around forever expecting the device to NAK it until data
> comes in (like the serial drivers do).

I can live with that.  For read urbs, we should know about them (usually
the driver only has one per device).  For writes with no timeouts, they
will fail if the device goes away, right?

> > > Otherwise, the device could be closed by the application and the driver
> > > unloaded only to have URBs it allocated still active only to have a
> > > callback made into an old modules address space.
> > 
> > Hence the need to prevent such a module from being unloaded until all
> > urbs "owned" by it are retired.
> 
> I take it back, the driver needs to unlink them, it can't depend on it
> happening automagically because of an error.

Only on urbs with no timeouts, right?

thanks,

greg k-h


-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to