Re: Vicam/3com homeconnect usb camera driver

From: John Tyner (jtyner@cs.ucr.edu)
Date: Sun Oct 06 2002 - 16:32:35 EST


> 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.

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?

Thanks,
John

-
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