Question about USB hotpluging
Dear Sir,
Dear Sir,
Environment: Suse 9.1 professional
Kernel: 2.6.4-52
Project: writing a USB driver for CMOS sensor
problem description:
1. the code is modified from ov511 sample source code.
2. the driver has been registered successfully.
3. videodev module also has been installed successfully.
4. the devices and drivers is located in /sys/bus/usb/devices and/sys/bus/usb/drivers
instead of /proc/bus/usb.
5. when I execute the following code in probe() function,
value=0x02;//declare as unsigned char
actualLen=1;
rc= usb_bulk_msg(wis->dev,
usb_sndbulkpipe(wis->dev,0),
&value,1,&actualLen,HZ);
printk(KERN_ALERT "########## reg_r[1], rc=%d: %s\n",rc,symbolic(urb_errlist,rc));
rc= usb_bulk_msg(wis->dev,
usb_recbulkpipe(wis->dev,0),
&rValue,1,&actualLen,HZ);
printk(KERN_ALERT "########## reg_r[2], actualLen=%d, buf=0x%x,rc=%d: %s \n",actualLen,rValue,rc,symbolic(urb_errlist,rc));
printk(KERN_ALERT "########## reg_r[3] ! \n");
6. I got the error messages from /var/log/messages and shown it
as attached file.
Does anybody be able to help me to solve this problem ?
Thanks and Regards,
Jerry
Nov 9 18:07:00 linux kernel: usb 1-2: new full speed USB device using address 6 Nov 9 18:07:00 linux kernel: usb 1-2: Product: USB camera Nov 9 18:07:00 linux /sbin/hotplug[5684]: add usb Nov 9 18:07:00 linux /sbin/hotplug[5684]: LOGPID=5684 OLDPWD=/ DEVPATH=/devices/pci0000:00/0000:00:13.0/usb1/1-2 PATH=/sbin:/usr/sbin:/bin:/usr/bin ACTION=add PWD=/etc/hotplug SHLVL=1 HOME=/ SEQNUM=237 _=/usr/bin/env Nov 9 18:07:00 linux kernel: Start to probe for device... ! Nov 9 18:07:00 linux kernel: Vendor ID 0x093a Nov 9 18:07:00 linux kernel: Product ID 0x0017 Nov 9 18:07:00 linux kernel: Start to probe for device...[0] ! Nov 9 18:07:00 linux kernel: Start to probe for device... ! [1] Nov 9 18:07:00 linux kernel: Start to probe for device... ! [2] Nov 9 18:07:00 linux kernel: Start to probe for device... ! [3] Nov 9 18:07:00 linux kernel: USB wiscms12 video device found Nov 9 18:07:00 linux kernel: Start to probe for device... ! [4] Nov 9 18:07:00 linux kernel: Start to probe for device... ! [5] Nov 9 18:07:00 linux kernel: Start to probe for device... ! [6] Nov 9 18:07:00 linux kernel: Start to probe for device... ! [7] Nov 9 18:07:00 linux kernel: size=993,alt=1 Nov 9 18:07:00 linux kernel: Start to probe for device... ! [8] Nov 9 18:07:00 linux kernel: Start to probe for device... ! [9] Nov 9 18:07:00 linux kernel: Start to probe for device... ! [10] Nov 9 18:07:00 linux kernel: Start to probe for device... ! [11] Nov 9 18:07:00 linux kernel: Device at usb-0000:00:13.0-2 registered to minor 0 Nov 9 18:07:00 linux kernel: Start to probe for device... ! [12] Nov 9 18:07:00 linux /sbin/hotplug[5686]: add usb Nov 9 18:07:00 linux /sbin/hotplug[5686]: LOGPID=5686 OLDPWD=/ DEVPATH=/devices/pci0000:00/0000:00:13.0/usb1/1-2/1-2:1.0 PATH=/sbin:/usr/sbin:/bin:/usr/bin ACTION=add PWD=/etc/hotplug SHLVL=1 HOME=/ DEVICE=/proc/bus/usb/001/006 PRODUCT=93a/17/100 TYPE=255/255/255 SEQNUM=238 _=/usr/bin/env Nov 9 18:07:00 linux /sbin/hotplug[5702]: add video4linux Nov 9 18:07:00 linux /sbin/hotplug[5702]: LOGPID=5702 OLDPWD=/ DEVPATH=/class/video4linux/video0 PATH=/sbin:/usr/sbin:/bin:/usr/bin ACTION=add PWD=/etc/hotplug SHLVL=1 HOME=/ SEQNUM=239 _=/usr/bin/env Nov 9 18:07:00 linux kernel: ########## reg_r[1], rc=-110: NAK (device does not respond) Nov 9 18:07:00 linux /sbin/hotplug[5702]: no runnable /etc/hotplug/video4linux.agent is installed Nov 9 18:07:00 linux kernel: ########## reg_r[2], actualLen=0, buf=0x2, rc=-110: NAK (device does not respond) Nov 9 18:07:00 linux kernel: ########## reg_r[3] ! Nov 9 18:07:00 linux /etc/hotplug/usb.agent[5686]: need a device for this command Nov 9 18:07:00 linux /etc/hotplug/usb.agent[5686]: Setup 'wiscms12 ' for 'USB product 93a/17/100' (from /etc/hotplug/usb.handmap) Nov 9 18:07:00 linux /etc/hotplug/usb.agent[5686]: Setup 'wiscms12 ' for 'USB product 93a/17/100' (from /etc/hotplug/usb.usermap) Nov 9 18:07:00 linux /etc/hotplug/usb.agent[5686]: No drivers for 'USB product 93a/17/100' (from /etc/hotplug/usb/ISDN.usermap) Nov 9 18:07:00 linux /etc/hotplug/usb.agent[5686]: No drivers for 'USB product 93a/17/100' (from /etc/hotplug/usb/alsasound.usermap) Nov 9 18:07:00 linux /etc/hotplug/usb.agent[5686]: No drivers for 'USB product 93a/17/100' (from /etc/hotplug/usb/sane-hardcoded.usermap) Nov 9 18:07:00 linux /etc/hotplug/usb.agent[5686]: No drivers for 'USB product 93a/17/100' (from /etc/hotplug/usb/tascam_fw.usermap) Nov 9 18:07:00 linux /etc/hotplug/usb.agent[5686]: No drivers for 'USB product 93a/17/100' (from /etc/hotplug/usb/usbcam.usermap)
Quoted 11 lines · Jerry
Dear Sir,
Dear Sir,
Environment: Suse 9.1 professional
Kernel: 2.6.4-52
Project: writing a USB driver for CMOS sensor
problem description:
1. the code is modified from ov511 sample source code.
2. the driver has been registered successfully.
3. videodev module also has been installed successfully.
4. the devices and drivers is located in/sys/bus/usb/devicesand/sys/bus/usb/drivers
Quoted 6 lines
instead of /proc/bus/usb.
5. when I execute the following code in probe() function,
value=0x02;//declare as unsigned char
actualLen=1;
rc= usb_bulk_msg(wis->dev,
usb_sndbulkpipe(wis->dev,0),---------------------------------------------------- ^ --------------^
Endpoint 0 is not a bulk endpoint.
Quoted 9 lines
&value,1,&actualLen,HZ); printk(KERN_ALERT "########## reg_r[1], rc=%d: %s\n",rc,symbolic(urb_errlist,rc));
rc= usb_bulk_msg(wis->dev, usb_recbulkpipe(wis->dev,0), &rValue,1,&actualLen,HZ); printk(KERN_ALERT "########## reg_r[2], actualLen=%d, buf=0x%x,
Quoted 8 lines
rc=%d: %s \n",actualLen,rValue,rc,symbolic(urb_errlist,rc));
printk(KERN_ALERT "########## reg_r[3] ! \n");6. I got the error messages from
/var/log/messagesand shown it
as attached file.Does anybody be able to help me to solve this problem ?
Alan Stern
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel