Re: Vicam/3com homeconnect usb camera driver

From: Oliver Neukum (oliver@neukum.name)
Date: Sun Oct 06 2002 - 16:44:02 EST


On Sunday 06 October 2002 23:32, John Tyner wrote:
> > And you should probably kill the tasklet before you unregister the video
> > device.
>
> The more I think about this, the more I think that killing the tasklet
> after unregistering the device is the correct way.
>
> From what I can tell, there are two ways that the disconnect function can
> be called: a physical disconnect or a module removal.

And as a result of an ioctl() through usbfs.

> In the case of a physical disconnect, the ordering probably doesn't matter
> because the tasklet won't be scheduled again because urb's would fail to
> complete successfully.
>
> The case of module removal becomes a bit more complicated (for reasons
> concerning module unload races that are being discussed by people far
> smarter than I). But in any event, I think that it makes more sense to
> unregister the open/close/etc. interface so that there is less chance of
> trying to send another urb (thus causing another schedule of the tasklet)
> before actually killing the tasklet.
>
> This also brings up the (somewhat) rhetorical question I posed in the
> driver's disconnect function. What happens when a disconnect occurs while
> the device is open?

I can't tell right now. I'll sync up after returning home and look into the
matter.

        Regards
                Oliver
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 07 2002 - 22:00:56 EST