Hi,
I have a problem with my sn9c102 webcam. After some debugging with Luca
Ricolia (see below),
Luca recognized that the problem comes from usb_submit_urb function, and
probably was introduced recently
in 2.6.20 kernel, maybe in ubuntu only. Can anyone help us with this ?
Best regards
Marek
lsusb:
Bus 002 Device 010: ID 0c45:608f Microdia
Bus 002 Device 005: ID 1131:1001 Integrated System Solution Corp.
KY-BT100 Bluetooth Adapter
Bus 002 Device 002: ID 045e:006a Microsoft Corp.
uname -a
Linux wiejca97c 2.6.20-15-generic #2 SMP Sun Apr 15 06:17:24 UTC 2007
x86_64 GNU/Linux
lspci:
00:00.0 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)
00:00.1 RAM memory: nVidia Corporation C51 Memory Controller 0 (rev a2)
00:00.2 RAM memory: nVidia Corporation C51 Memory Controller 1 (rev a2)
00:00.3 RAM memory: nVidia Corporation C51 Memory Controller 5 (rev a2)
00:00.4 RAM memory: nVidia Corporation C51 Memory Controller 4 (rev a2)
00:00.5 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)
00:00.6 RAM memory: nVidia Corporation C51 Memory Controller 3 (rev a2)
00:00.7 RAM memory: nVidia Corporation C51 Memory Controller 2 (rev a2)
00:02.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)
00:03.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)
00:04.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)
00:05.0 VGA compatible controller: nVidia Corporation C51PV [GeForce
6150] (rev a2)
00:09.0 RAM memory: nVidia Corporation MCP51 Host Bridge (rev a2)
00:0a.0 ISA bridge: nVidia Corporation MCP51 LPC Bridge (rev a3)
00:0a.1 SMBus: nVidia Corporation MCP51 SMBus (rev a3)
00:0a.2 RAM memory: nVidia Corporation MCP51 Memory Controller 0 (rev a3)
00:0b.0 USB Controller: nVidia Corporation MCP51 USB Controller (rev a3)
00:0b.1 USB Controller: nVidia Corporation MCP51 USB Controller (rev a3)
00:0d.0 IDE interface: nVidia Corporation MCP51 IDE (rev a1)
00:0e.0 IDE interface: nVidia Corporation MCP51 Serial ATA Controller
(rev a1)
00:0f.0 IDE interface: nVidia Corporation MCP51 Serial ATA Controller
(rev a1)
00:10.0 PCI bridge: nVidia Corporation MCP51 PCI Bridge (rev a2)
00:10.1 Audio device: nVidia Corporation MCP51 High Definition Audio
(rev a2)
00:14.0 Bridge: nVidia Corporation MCP51 Ethernet Controller (rev a3)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron]
HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron]
Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron]
DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron]
Miscellaneous Control
04:05.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22/A
IEEE-1394a-2000 Controller (PHY/Link)
04:08.0 Network controller: RaLink RT2561/RT61 rev B 802.11g
CHAT:
Hi
17:51:48
l_r 17:51:52
i miswrote in my previous email: i didn't not test the driver on
ubuntu-feisty yet, although i have it
mbrudka1 17:52:16
its not only feisty but also smd64 architecture :)
well, amd64
l_r 17:52:35
ok, videoview does not work definitly
mbrudka1 17:52:44
it doesn't
l_r 17:53:07
i know, it's compiled for 32-bit
mbrudka1 17:53:27
I see
l_r 17:53:28
however do a simple cat
mbrudka1 17:53:41
however it seems vv finds all necessary libraries
l_r 17:54:07
do a simple cat on the video device and tell me the kernel messages
load the driver with debug=3 first
mbrudka1 17:56:31
May 13 17:55:49 wiejca97c kernel: [ 4322.911221] sn9c102: V4L2 driver
for SN9C1xx PC
Camera Controllers v1:1.44
May 13 17:55:49 wiejca97c kernel: [ 4322.911935] usbcore: registered
new interface
driver sn9c102
May 13 17:56:11 wiejca97c kernel: [ 4342.238572] usb 2-5: new full speed
USB device using ohci_hcd and address 7
May 13 17:56:11 wiejca97c kernel: [ 4342.427369] usb 2-5: configuration
#1 chosen from 1 choice
May 13 17:56:11 wiejca97c kernel: [ 4342.432668] usb 2-5: SN9C103 PC
Camera Controller detected (vid:pid 0x0C45:0x608F)
May 13 17:56:11 wiejca97c kernel: [ 4342.456929] usb 2-5:
[sn9c102_i2c_try_raw_read:404] I2C read failed for HV7131D image sensor
May 13 17:56:11 wiejca97c kernel: [ 4342.473116] usb 2-5:
[sn9c102_i2c_try_raw_read:404] I2C read failed for HV7131D image sensor
May 13 17:56:11 wiejca97c kernel: [ 4342.505470] usb 2-5:
[sn9c102_i2c_try_raw_read:404] I2C read failed for HV7131R image sensor
May 13 17:56:11 wiejca97c kernel: [ 4342.529751] usb 2-5:
[sn9c102_i2c_try_raw_read:404] I2C read failed for MI-0343 image sensor
May 13 17:56:11 wiejca97c kernel: [ 4342.554012] usb 2-5:
[sn9c102_i2c_try_raw_read:404] I2C read failed for MI-0360 image sensor
May 13 17:56:11 wiejca97c kernel: [ 4342.578290] usb 2-5:
[sn9c102_i2c_try_raw_read:404] I2C read failed for PAS106B image sensor
May 13 17:56:11 wiejca97c kernel: [ 4342.594468] usb 2-5:
[sn9c102_i2c_try_raw_read:404] I2C read failed for PAS106B image sensor
May 13 17:56:11 wiejca97c kernel: [ 4342.621428] usb 2-5:
[sn9c102_i2c_try_raw_read:404] I2C read failed for PAS202BCB image sensor
May 13 17:56:11 wiejca97c kernel: [ 4342.637609] usb 2-5:
[sn9c102_i2c_try_raw_read:404] I2C read failed for PAS202BCB image sensor
May 13 17:56:11 wiejca97c kernel: [ 4342.664579] usb 2-5:
[sn9c102_i2c_try_raw_read:404] I2C read failed for OV7630 image sensor
May 13 17:56:11 wiejca97c kernel: [ 4342.702337] usb 2-5: OV7630 image
sensor detected
May 13 17:56:11 wiejca97c kernel: [ 4342.702344] usb 2-5:
[sn9c102_usb_probe:3258] Support for OV7630 maintained by Luca Risolia
<[EMAIL PROTECTED]>
May 13 17:56:11 wiejca97c kernel: [ 4342.998962] usb 2-5:
[sn9c102_init:1666] Compressed video format is active, quality 1
May 13 17:56:11 wiejca97c kernel: [ 4343.012434] usb 2-5:
[sn9c102_init:1689] Image sensor supports 'global gain' control
May 13 17:56:12 wiejca97c kernel: [ 4343.020523] usb 2-5:
[sn9c102_init:1689] Image sensor supports 'exposure' control
May 13 17:56:12 wiejca97c kernel: [ 4343.028627] usb 2-5:
[sn9c102_init:1689] Image sensor supports 'white balance background:
red' control
May 13 17:56:12 wiejca97c kernel: [ 4343.036714] usb 2-5:
[sn9c102_init:1689] Image sensor supports 'white balance background:
blue' control
May 13 17:56:12 wiejca97c kernel: [ 4343.039412] usb 2-5:
[sn9c102_init:1689] Image sensor supports 'red balance' control
May 13 17:56:12 wiejca97c kernel: [ 4343.042120] usb 2-5:
[sn9c102_init:1689] Image sensor supports 'blue balance' control
May 13 17:56:12 wiejca97c kernel: [ 4343.050192] usb 2-5:
[sn9c102_init:1689] Image sensor supports 'auto adjust' control
May 13 17:56:12 wiejca97c kernel: [ 4343.058291] usb 2-5:
[sn9c102_init:1689] Image sensor supports 'vertical flip' control
May 13 17:56:12 wiejca97c kernel: [ 4343.060984] usb 2-5:
[sn9c102_init:1689] Image sensor supports 'green balance' control
May 13 17:56:12 wiejca97c kernel: [ 4343.069076] usb 2-5:
[sn9c102_init:1689] Image sensor supports 'band filter' control
May 13 17:56:12 wiejca97c kernel: [ 4343.077159] usb 2-5:
[sn9c102_init:1689] Image sensor supports 'rgb gamma' control
May 13 17:56:12 wiejca97c kernel: [ 4343.077168] usb 2-5: Initialization
succeeded
May 13 17:56:12 wiejca97c kernel: [ 4343.077202] usb 2-5: V4L2 device
registered as /dev/video0
May 13 17:56:12 wiejca97c kernel: [ 4343.077209] usb 2-5: Optional
device control through 'sysfs' interface ready
after plug in
l_r 17:57:04
ok
mbrudka1 17:57:07
[EMAIL PROTECTED]:~# cat < /dev/video0
-su: /dev/video0: No space left on device
and nothing in dmesg
l_r 17:57:26
it looks like a kernel bug
mbrudka1 17:57:49
related with usb hub bandwidth ?
l_r 17:57:56
yes
you are not the only person reporting this problem
mbrudka1 17:58:25
I'm afraid I have only one usb hub
l_r 17:58:36
other switched back to 2.6.20 and the drivers worked ok
mbrudka1 17:58:56
I saw a patch for this for spca5xx
l_r 17:59:22
wait a moment , i'll boot in kubuntu feisty
and try there
mbrudka1 17:59:27
My kernel is also 2.6.20
l_r 17:59:36
brb
mbrudka1 17:59:38
[EMAIL PROTECTED]:~# uname -a
Linux wiejca97c 2.6.20-15-generic #2 SMP Sun Apr 15 06:17:24 UTC 2007
x86_64 GNU/Linux
ok
l_r 17:59:48
ok, i have the same kernel
l_r opuścił(a) rozmowę (Zakończ: "Remote host closed the connection" ).
17:59:54
Użytkownik l_r wszedł na kanał #linux-projects
18:04:25
l_r 18:04:30
ok here i am
mbrudka1 18:04:32
welcom back
l_r 18:04:37
everything is working fine..
mbrudka1 18:04:53
[EMAIL PROTECTED]:~# lsusb
Bus 002 Device 007: ID 0c45:608f Microdia
l_r 18:04:56
Linux luca-laptop 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007
i686 GNU/Linux
it sounds like a bug in the kernel
mbrudka1 18:05:43
What can I do then ?
l_r 18:05:58
report it to the kernel mailing list
i suggest that you try with official kernels first
as i know kubuntu uses a patched kernel
mbrudka1 18:06:31
I see.
Then I suppose I shall report the bug vie ubuntu support.
l_r 18:07:26
basically open() fails
yes
mbrudka1 18:07:34
Right
I've installed your debugger for sn9c102. May it help somehow ?
l_r 18:09:25
well yes, run it, set debug to 3 , start capturing , try to use
videoview again and save the output
then send me the log by email
mbrudka1 18:12:25
debugger show nothing, butkernel after videoview reported:
May 13 18:10:27 wiejca97c kernel: [ 5113.581786] usb 2-5: Moved SN9C1XX
register index to 0x00
May 13 18:10:27 wiejca97c kernel: [ 5113.581791] usb 2-5:
[sn9c102_store_reg:1078] Written bytes: 1
May 13 18:10:27 wiejca97c kernel: [ 5113.582239] usb 2-5:
[sn9c102_show_val:1109] Read bytes: 3, value: 16
May 13 18:10:27 wiejca97c kernel: [ 5113.582427] usb 2-5: Moved sensor
register index to 0x00
May 13 18:10:27 wiejca97c kernel: [ 5113.582432] usb 2-5:
[sn9c102_store_i2c_reg:1208] Written bytes: 1
May 13 18:10:27 wiejca97c kernel: [ 5113.598427] usb 2-5:
[sn9c102_show_i2c_val:1244] Read bytes: 3, value: 20
l_r 18:13:20
do you have a text editor?
mbrudka1 18:13:22
well, not after videoview, but after debugger
yes
l_r 18:13:27
open sn9c102_core.c
goto to the sn9c102_start_transfer() function
mbrudka1 18:14:05
ok
and ?
l_r 18:14:39
for (i = 0; i < SN9C102_URBS; i++) {
err = usb_submit_urb(cam->urb[i], GFP_KERNEL);
if (err) {
for (j = i-1; j >= 0; j--)
usb_kill_urb(cam->urb[j]);
DBG(1, "usb_submit_urb() failed, error %d", err);
goto free_urbs;
}
}
i think usb_submit_urb fails there
wait a moment
s8 i, j;
int err = 0;
PDBG("Packet size: %d", psz);
see that PDBG and add it at the beginning of the function..
then compile the driver, unload the one in memory, load the new module
again and report the number
do not forget to open() again, a simple cat will suffice
mbrudka1 18:20:25
May 13 18:20:16 wiejca97c kernel: [ 5642.952034] usb 2-5:
[/var/install/sn9c1xx-1.44/sn9c102_core.c:sn9c102_start_transfer:873]
Packet size: 1003
l_r 18:20:55
correct
or (i = 0; i < SN9C102_URBS; i++) {
err = usb_submit_urb(cam->urb[i], GFP_KERNEL);
that func fails for some reason . you can make sure of this by adding a
debug line like PDBG("err %d", err) after the line above
mbrudka1 18:26:32
May 13 18:26:22 wiejca97c kernel: [ 5973.046745] usb 2-5:
[/var/install/sn9c1xx-1.44/sn9c102_core.c:sn9c102_start_transfer:873]
Packet size: 1003
May 13 18:26:23 wiejca97c kernel: [ 5973.053209] usb 2-5:
[/var/install/sn9c1xx-1.44/sn9c102_core.c:sn9c102_start_transfer:929]
err -28
You're right
l_r 18:27:34
PDBG("err %d , i %d", err , i) is even better
ok, it's a bug in the usb core
report it to the usb-mailing-list. you can cc me. make clear that the
problem does not happen to the author, who has the same system
it's hardware related in my opinion
mention that you have detached all the usb devices from the hub, as the
error means "not enough bandwith"
it's worth trying some previous kernel and see if this still happens. i
think this bug has been introduced in a very recent version of the kernel
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel