Trouble with USB-Stimulus Driver Porting

"Pu Jiangbo" <[email protected]>
Newsgroups gmane.linux.usb.devel,gmane.spam.detected
Message-ID <[email protected]>
Dear all,

I've tried to port usb-stimulus.c into kernel 2.6.18. When it comes into stimulus_open: 
if ( usb_submit_urb( &dev->int_urb, GFP_KERNEL ) ), system seemed to call "kref_get()" and 
receive BUG warnings(and after that, linux went into halt). I couldn't figure out why?

Could you please help me to check it through?

Thank you!

Sincerely, Brooks
2007-04-04

Apr  4 10:32:35 linux-develop kernel: usbcore: registered new driver stimulus
Apr  4 10:32:41 linux-develop kernel: usb 4-2: new full speed USB
device using uhci_hcd and address 2
Apr  4 10:32:41 linux-develop kernel: usb 4-2: new device found,
idVendor=abcd, idProduct=c104
Apr  4 10:32:41 linux-develop kernel: usb 4-2: new device strings:
Mfr=1, Product=2, SerialNumber=3
Apr  4 10:32:41 linux-develop kernel: usb 4-2: Product: STG2004
Apr  4 10:32:41 linux-develop kernel: usb 4-2: Manufacturer: Multi
Channel Systems MCS GmbH
Apr  4 10:32:41 linux-develop kernel: usb 4-2: SerialNumber: 5069-0152
Apr  4 10:32:41 linux-develop kernel: usb 4-2: configuration #1 chosen
from 1 choice
Apr  4 10:32:41 linux-develop kernel: Stimulus: Entering probe.
Apr  4 10:32:41 linux-develop kernel: Stimulus: Device Found!
Apr  4 10:32:41 linux-develop kernel: Stimulus: WARNING:
iso_in_size:0, not sync.
Apr  4 10:32:41 linux-develop kernel: data urb buffer: d35f4520 len: 0
Apr  4 10:32:41 linux-develop kernel: data urb buffer: d35f4540 len: 0
Apr  4 10:32:41 linux-develop kernel:
/home/mea/stg2004_driver/stg2004_driver-driver.c: USB Stimulus device
now attached to STG200X-200
Apr  4 10:32:51 linux-develop sudo:      mea : TTY=pts/6 ;
PWD=/home/mea ; USER=root ; COMMAND=/opt/kde3/bin/kdesu_stub -
Apr  4 10:32:51 linux-develop sudo:      mea : TTY=pts/6 ;
PWD=/home/mea ; USER=root ; COMMAND=/opt/kde3/bin/kdesu_stub -
Apr  4 10:32:51 linux-develop gconfd (root-4266): starting (version
2.14.0), pid 4266 user 'root'
Apr  4 10:32:52 linux-develop gconfd (root-4266): Resolved address
"xml:readonly:/etc/opt/gnome/gconf/gconf.xml.mandatory" to a read-only
configuration source at position 0
Apr  4 10:32:52 linux-develop gconfd (root-4266): Resolved address
"xml:readwrite:/root/.gconf" to a writable configuration source at
position 1
Apr  4 10:32:52 linux-develop gconfd (root-4266): Resolved address
"xml:readonly:/etc/opt/gnome/gconf/gconf.xml.defaults" to a read-only
configuration source at position 2
Apr  4 10:32:52 linux-develop gconfd (root-4266): Resolved address
"xml:readonly:/etc/opt/gnome/gconf/gconf.xml.schemas" to a read-only
configuration source at position 3
Apr  4 10:33:07 linux-develop su: (to root) mea on /dev/pts/2
Apr  4 10:33:16 linux-develop kernel: Stimulus: Entering stimulus_open.
Apr  4 10:33:16 linux-develop kernel: Stimulus: f7d43400, [subminor]:0
[channel]:0.
Apr  4 10:33:16 linux-develop kernel: Stimulus: Going to submit INT URB.
Apr  4 10:33:16 linux-develop kernel: BUG: warning at lib/kref.c:32/kref_get()
Apr  4 10:33:16 linux-develop kernel:  [<c01c0946>] kref_get+0x35/0x3f
Apr  4 10:33:16 linux-develop kernel:  [<f8e3d51a>]
usb_get_urb+0xc/0x10 [usbcore]
Apr  4 10:33:16 linux-develop kernel:  [<f8e3cc22>]
hcd_submit_urb+0xc4/0x777 [usbcore]
Apr  4 10:33:16 linux-develop kernel:  [<c0119724>] __wake_up+0x2a/0x3d
Apr  4 10:33:16 linux-develop kernel:  [<c012074d>]
release_console_sem+0x185/0x1c4
Apr  4 10:33:16 linux-develop kernel:  [<c017241b>] link_path_walk+0xb3/0xbd
Apr  4 10:33:16 linux-develop kernel:  [<c016306f>] get_unused_fd+0x57/0xbd
Apr  4 10:33:16 linux-develop kernel:  [<f8e3d4ea>]
usb_submit_urb+0x1b6/0x1da [usbcore]
Apr  4 10:33:16 linux-develop kernel:  [<f8c70e68>]
stimulus_open+0x103/0x18f [stg2004_driver_driver]
Apr  4 10:33:16 linux-develop kernel:  [<c016c49d>] chrdev_open+0x124/0x13f
Apr  4 10:33:16 linux-develop kernel:  [<c016c379>] chrdev_open+0x0/0x13f
Apr  4 10:33:16 linux-develop kernel:  [<c016319c>] __dentry_open+0xc7/0x1ab
Apr  4 10:33:16 linux-develop kernel:  [<c01632fa>] nameidata_to_filp+0x24/0x33
Apr  4 10:33:16 linux-develop kernel:  [<c0163340>] do_filp_open+0x37/0x3e
Apr  4 10:33:16 linux-develop kernel:  [<c016306f>] get_unused_fd+0x57/0xbd
Apr  4 10:33:16 linux-develop kernel:  [<c016338d>] do_sys_open+0x46/0xc8
Apr  4 10:33:16 linux-develop kernel:  [<c0163448>] sys_open+0x1c/0x1e
Apr  4 10:33:16 linux-develop kernel:  [<c0103d5d>] sysenter_past_esp+0x56/0x79
Apr  4 10:33:16 linux-develop kernel: BEFORE GET
Apr  4 10:33:16 linux-develop kernel: Stimulus: Exit from open()
Apr  4 10:33:16 linux-develop kernel: retval: 100 len: 100
Apr  4 10:33:16 linux-develop kernel: usb_control_msg: len: 100
'6d697453' retval: 0
Apr  4 10:33:16 linux-develop kernel: get version: len: 34
Apr  4 10:33:16 linux-develop kernel: retval: 34 len: 34
Apr  4 10:33:16 linux-develop kernel: usb_control_msg: len: 34
'2e331c02' retval: 0
Apr  4 10:33:16 linux-develop kernel: cmd:48 len 8 mult 8
Apr  4 10:33:16 linux-develop kernel: retval: 8 len: 9
Apr  4 10:33:16 linux-develop kernel: usb_control_msg (getval): len: 8
'1f40' retval: 0
Apr  4 10:33:16 linux-develop kernel: cmd:49 len 8 mult 8
Apr  4 10:33:16 linux-develop kernel: retval: 8 len: 9
Apr  4 10:33:16 linux-develop kernel: usb_control_msg (getval): len: 8
'320' retval: 0
Apr  4 10:33:16 linux-develop kernel: Stimulus: Entering coldfire_int_irq().
Apr  4 10:33:16 linux-develop kernel: irq 0 data: 0 status: 0
interval: 128 length: 4 jiffies: -12146 -121460 ms
Apr  4 10:33:16 linux-develop kernel: Stimulus: Leaving coldfire_int_irq().
Apr  4 10:33:16 linux-develop kernel: Stimulus: Going to Release Channel 0.
Apr  4 10:33:16 linux-develop kernel: Stimulus: In Release: Going to
unlink INT URB.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.