-
Nemosoft Unv. authored
Attached are two patches, one for 2.4.21 and 2.5.75 for the PWC driver. I assume the 2.5.75 patch will go into 2.6.0-test* without problems (I hope this driver can make it into the kernel before the 'real' 2.6.0). From the ChangeLog: * 20 dev_hints (per request) * Hot unplugging should be better, no more dangling pointers or memory leaks * Added reserved Logitech webcam IDs * Device now remembers size & fps between close()/open() * Removed palette stuff altogether I have two open issues, though: Oliver Neukem pointed out that I should resubmit URBs in the 2.5. kernel even in case of USB errors, which I did. However, I never got a patch so I'm not 100% if this is the solution that he had in mind. Second... I've been thinking long and hard about the problem of properly deregistering the video device when the cam gets unplugged while it is in use. Various schemes failed; immediately deregistering while in the disconnect routine causes crashes because the videodev layer sets some pointer to null but still uses it later. A deregister in close() causes hangs because of locked mutexes... My current implemententation is to set an errorflag in the disconnect routine, then wait there (using schedule()) until close() is being called (I assume the application will immediately close the device when it gets a serious error). So far it doesn't crash :-)
7b680613