Re: Vicam/3com homeconnect usb camera driver

From: Oliver Neukum (oliver@neukum.name)
Date: Sun Oct 06 2002 - 23:55:13 EST


> Attached is a patch against 2.5.40 with __dev* uses removed and the error
> checking in the open routine fixed.
>
> Let me know if the ordering of the video_unregister_device and tasklet_kill
> is still an issue.

It isn't. But the disconnect is still wrong. You fail to unlink the current
urb. This has to be done before you kill the tasklet. And you have to use a
flag and a spinlock to guard against a race with the completion handler.
There's a recent discussion on this in the usb archives. And you need to
defer freeing the memory if the device is open.
Have a look at how pwc does it. It should be correct in that regard.

And while you at it, could you rename the tasklet from ...bh... to ...tl... ?
It's no longer a bottom half.

        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:57 EST