[cpia] Device or resource busy

sbertin@mindspring.com sbertin@mindspring.com
Fri, 11 Feb 2000 17:42:39 -0500 (EST)


--1037094400-1804289383-950308996=:805
Content-Type: TEXT/plain; charset=us-ascii

On 11 Feb, Samo Gabrovec wrote:
> ======================================================
> In The log file i can see the folowing 
> ------------------------------------------
> Feb 11 14:03:27 mail popper[942]: connect from 129.177.47.12
> Feb 11 14:07:26 mail kernel: parport0: PC-style at 0x378
> [SPP,ECP,ECPEPP,ECPPS2]
> Feb 11 14:07:26 mail kernel: Linux video capture interface: v1.00
> Feb 11 14:07:26 mail kernel: V4L-Driver for Vision CPiA based cameras
> v0.7.1
> Feb 11 14:07:26 mail modprobe: modprobe: Can't locate module cpia_pp
> Feb 11 14:07:26 mail modprobe: modprobe: Can't locate module cpia_usb
> Feb 11 14:07:26 mail kernel: Parallel port driver for Vision CPiA based
> cameras v0.7.1
> Feb 11 14:07:26 mail kernel:   0 camera(s) found
> ================================================= 

About the only way I can see that this would fail without more log
messages is if you selected CONFIG_PNP_PARPORT_MODULE, but not
CONFIG_KMOD in your kernel configuration.  Try manually loading
parport_probe the loading cpia_pp again.  I've attached a patch that
should work around this problem and also avoid loading parport_probe if
it had previously been loaded.

Scott J. Bertin
sbertin@mindspring.com


--1037094400-1804289383-950308996=:805
Content-Type: TEXT/plain; CHARSET=US-ASCII
Content-Disposition: attachment; filename="probe.patch"

Index: cpia/module/cpia_pp.c
===================================================================
RCS file: /home/cvs/cpia/module/cpia_pp.c,v
retrieving revision 1.8
diff -u -r1.8 cpia_pp.c
--- cpia/module/cpia_pp.c	2000/02/06 18:24:54	1.8
+++ cpia/module/cpia_pp.c	2000/02/11 22:35:01
@@ -1629,10 +1629,12 @@
 
 #if defined(CONFIG_PNP_PARPORT) || \
     (defined(MODULE) && defined(CONFIG_PNP_PARPORT_MODULE))
-			if (port->probe_info.class != PARPORT_CLASS_MEDIA ||
-			    port->probe_info.cmdset == NULL ||
-			    strncmp(port->probe_info.cmdset, "CPIA_1", 6) != 0){
-				continue;
+			if(port->probe_info.model) {
+				if (port->probe_info.class != PARPORT_CLASS_MEDIA ||
+				    port->probe_info.cmdset == NULL ||
+				    strncmp(port->probe_info.cmdset, "CPIA_1", 6) != 0){
+					continue;
+				}
 			}
 #endif
 			if (!cpia_pp_register(port)) {
@@ -1696,7 +1698,9 @@
 		}
 	}
 #if defined(CONFIG_KMOD) && defined(CONFIG_PNP_PARPORT_MODULE)
-	request_module("parport_probe");
+	if(parport_enumerate() && !parport_enumerate()->probe_info.model) {
+		request_module("parport_probe");
+	}
 #endif
 	return cpia_pp_init();
 }

--1037094400-1804289383-950308996=:805--