[cpia] [patch] CPiA deadlock for 2.3 kernel
Johannes Erdfelt
jerdfelt@valinux.com
Fri, 21 Apr 2000 20:55:50 -0700
--dTy3Mrz/UPE2dbVg
Content-Type: text/plain; charset=us-ascii
This is identical to the deadlock patch I sent to the CPiA list a week ago
but for 2.3 kernels (just offsets are different).
Joseph, give this patch a try and see if your problem goes away.
Randy, this patch isn't specifically for USB. Do you want these sent to
you? And, if you don't mind, please send it on to Linus :)
JE
--dTy3Mrz/UPE2dbVg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="cpia-deadlock.patch"
--- linux-2.3.99-pre6-5/drivers/char/cpia.c Mon Mar 27 10:22:31 2000
+++ linux-2.3.99-pre4-5/drivers/char/cpia.c Fri Apr 21 19:51:36 2000
@@ -1577,9 +1577,13 @@
cmd[7] = 0;
retval = cam->ops->transferCmd(cam->lowlevel_data, cmd, data);
- if (retval)
+ if (retval) {
DBG("%x - failed, retval=%d\n", command, retval);
- else {
+ if (command == CPIA_COMMAND_GetColourParams ||
+ command == CPIA_COMMAND_GetColourBalance ||
+ command == CPIA_COMMAND_GetExposure)
+ up(&cam->param_lock);
+ } else {
switch(command) {
case CPIA_COMMAND_GetCPIAVersion:
cam->params.version.firmwareVersion = data[0];
--dTy3Mrz/UPE2dbVg--