Web lists-archives.com

Re: [Spca50x-devs] USB webcam driver is not working with 2.6.10 kernel




Sorry, i forgot to attach dmesg,

Please find the attached dmesg.txt



 -----Original Message-----
From: 	manjunatham [mailto:manjunatham@xxxxxxxxxxxxxxx]
Sent:	Thursday, July 26, 2007 4:50 PM
To:	'davinci-linux-open-source@xxxxxxxxxxxxxxxxxx [manjunatham]   om';
'linux-omap-open-source-owner@xxxxxxxxxxxxxxxxxxxx'; 'Michel Xhaard';
'spca50x-devs@xxxxxxxxxxxxxxxxxxxxx'
Cc:	Mahendra Nayak M; Madhusudhan Srinivasan; 'Meher'; Yogesh Kumar M
Subject:	USB webcam driver is not working with  2.6.10 kernel

Hi all

I could able to make my webcam(logitech quick cam) work with TI-DAVINCI EMV
using
gspcav1-20070508 and spcaview-20061208 with 2.6.20-omap1 kernel.

But we need to use 2.6.10 for the board as per our client requirement. I am
facing strange problem with 2.6.10 usb driver, the details are as below:

Webcam will detect without any problem and when i run an application
./spcaview, it fails by returning usb_submit_urb(0) ret -16 (EBUSY).

I had put printk's in musb driver and found that EBUSY is because (in
musb_host.c, pEnd=musb_find_ep(pThis,pUrb);) pEnd is always = 0 or less,no
Isoc ep is allocated to webcam.

Is it because ep0 (for enumeration) is not released by webcam??.

some more inputs are

It uses fifo_mode=1 and address 2 for which only FIFO_RX is defined (in
drivers/usb/musb/plat_uds.c)where as in kernel 2.6.20 it uses fifo_mode=2
and address 3 for which only FIFO_RXTX is defined and hence no issues.

If i change the fifo_mode to 2 in kernel 2.6.10, inserting musb_hdrc.ko will
fail returning error -22.


I have attached dmesg for further information,

Note: If i use (spca5xx-20060501)spca5xx.ko driver,the webcam itself will
not be detected.
	In spca5xx-20060501 README file the kernel 2.6.10 is not listed, is it not
supported or not tested?

 Please suggest me how to approach to solve this problem..

 Thanks in advance
 Manjunath AM
Linux version 2.6.10_mvl401-davinci_evm (root@jadhav) (gcc version 3.4.3 (MontaVista 3.4.3-25.0.30.0501131 2005-07-23)) #46 Thu Jul 26 14:24:04 IST 2007
CPU: ARM926EJ-Sid(wb) [41069265] revision 5 (ARMv5TEJ)
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Machine: DaVinci EVM
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 65536
  DMA zone: 32768 pages, LIFO batch:8
  Normal zone: 32768 pages, LIFO batch:8
  HighMem zone: 0 pages, LIFO batch:1
Built 1 zonelists
Kernel command line: console=ttyS0,115200n8 root=/dev/nfs nfsroot=10.50.40.210:/root/workdir/filesys,nolock ip=10.50.40.202:10.50.40.210:10.50.40.1:255.255.248.0:Elix1000::off:mem=120M video=dm64xxfb:output=pal video=dm64xxfb:output=pal
PID hash table entries: 2048 (order: 11, 32768 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 256MB = 256MB total
Memory: 256256KB available (2671K code, 543K data, 140K init)
Calibrating delay loop... 148.27 BogoMIPS (lpj=741376)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
spawn_desched_task(00000000)
desched cpu_callback 3/00000000
ksoftirqd started up.
desched cpu_callback 2/00000000
desched thread 0 started up.
NET: Registered protocol family 16
Registering platform device 'musb_hdrc'. Parent at platform
DaVinci I2C DEBUG: 10:38:28 Jul 23 2007
Registering platform device 'i2c'. Parent at platform
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
yaffs Jul 23 2007 10:37:59 Installing. 
davincifb: Options "output=pal"
DaVinci: Output on PAL in COMPOSITE format, Enabled windows: Video0 Video1 OSD0 OSD1
Setting Video0 size 720x576, position (0,0)
Setting Video1 size 720x576, position (0,0)
Setting OSD0 size 720x576, position (0,0)
Setting OSD1 size 720x576, position (0,0)
Registering platform device 'davincifb.0'. Parent at platform
Setting Up Clocks for DM420 OSD
Console: switching to colour frame buffer device 90x36
fb0: dm_osd0_fb frame buffer device
fb1: dm_vid0_fb frame buffer device
fb2: dm_osd1_fb frame buffer device
fb3: dm_vid1_fb frame buffer device
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
Registering platform device 'serial8250'. Parent at platform
ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
io scheduler noop registered
io scheduler anticipatory registered
RAMDISK driver initialized: 1 RAM disks of 32768K size 1024 blocksize
Registering platform device 'ti_davinci_emac'. Parent at platform
TI DaVinci EMAC: MAC address is deadbeaf
TI DaVinci EMAC Linux version updated 4.0
TI DaVinci EMAC: Installed 1 instances.
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky
netconsole: not configured, aborting
i2c /dev entries driver
Linux video capture interface: v1.00
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
Probing IDE interface ide0...
Palm Chip BK3710 IDE Register Fail
elevator: using anticipatory as default io scheduler
physmap flash device: 0 at 2000000
Failed to ioremap
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
mice: PS/2 mouse device common for all mice
Registering platform device 'davinci-audio.0'. Parent at platform
NET: Registered protocol family 2
IP: routing cache hash table of 2048 buckets, 16Kbytes
TCP: Hash tables configured (established 16384 bind 32768)
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
NET: Registered protocol family 1
NET: Registered protocol family 10
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
IP-Config: Complete:
      device=eth0, addr=10.50.40.202, mask=255.255.248.0, gw=10.50.40.1,
     host=Elix1000, domain=, nis-domain=(none),
     bootserver=10.50.40.210, rootserver=10.50.40.210, rootpath=
Looking up port of RPC 100003/2 on 10.50.40.210
Looking up port of RPC 100005/1 on 10.50.40.210
eth0: no IPv6 routers present
VFS: Mounted root (nfs filesystem).
Freeing init memory: 140K
musb_hdrc: version 2.2a/db-0.4.8 [pio] [host] [debug=0]
musb_hdrc: ConfigData=0x06 (UTMI-8, dyn FIFOs, SoftConn)
musb_hdrc: MHDRC RTL version 1.300 
musb_hdrc: setup fifo_mode 1
musb_hdrc: hw_ep 0shared, max 64
musb_hdrc: hw_ep 1tx, doublebuffer, max 512
musb_hdrc: hw_ep 2rx, doublebuffer, max 512
musb_hdrc: hw_ep 3shared, max 256
musb_hdrc: hw_ep 4shared, max 256
musb_hdrc: USB Host mode controller at d0860000 using PIO, IRQ 12
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
usb usb1: new device strings: Mfr=0, Product=0, SerialNumber=0
usb usb1: hotplug
usb usb1: adding 1-0:1.0 (config #1, interface 0)
usb 1-0:1.0: hotplug
hub 1-0:1.0: usb_probe_interface
hub 1-0:1.0: usb_probe_interface - got id
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
hub 1-0:1.0: standalone hub
hub 1-0:1.0: individual port power switching
hub 1-0:1.0: no over-current protection
hub 1-0:1.0: Single TT
hub 1-0:1.0: TT requires at most 8 FS bit times
hub 1-0:1.0: power on to power good time: 100ms
hub 1-0:1.0: local power source is good
hub 1-0:1.0: enabling power on all ports
hub 1-0:1.0: state 5 ports 1 chg ffff evt ffff
hub 1-0:1.0: port 1, status 0100, change 0000, 12 Mb/s
usbcore: registered new driver gspca
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: gspca driver 01.00.18 registered
hub 1-0:1.0: state 5 ports 1 chg fffe evt 0006
hub 1-0:1.0: port 1, status 0101, change 0001, 12 Mb/s
hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101
usb 1-1: new full speed USB device using musb_hdrc and address 2
usb 1-1: ep0 maxpacket = 8
usb 1-1: new device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: default language 0x0409
usb 1-1: Product: Camera
usb 1-1: Manufacturer:         
usb 1-1: hotplug
usb 1-1: adding 1-1:1.0 (config #1, interface 0)
usb 1-1:1.0: hotplug
gspca 1-1:1.0: usb_probe_interface
gspca 1-1:1.0: usb_probe_interface - got id
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: USB GSPCA camera found.(SPCA561A)
spca50x->funct= bf00aae0<6>/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca5xx_probe:4156] Camera type S561 
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca50x_configure:2643] video_register_device succeeded
/home/manju/TI-DAVINCI/gspcav1-20070508/Sunplus/spca561.h: [spca561_config:742] Read from GLOBAL: USB Vendor ID 0x046d
/home/manju/TI-DAVINCI/gspcav1-20070508/Sunplus/spca561.h: [spca561_config:747] Read from GLOBAL: USB Product ID 0x092f
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca5xx_getcapability:1238] maxw 352 maxh 288 minw 160 minh 120
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca5xx_setFrameDecoder:1841] spca50x->frame[i].width =160

/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca5xx_setFrameDecoder:1842] spca50x->frame[i].height= 120

spca50x->frame[i].cameratype=12
spca50x->frame[i].scanlength=28800
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca5xx_setFrameDecoder:1841] spca50x->frame[i].width =160

/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca5xx_setFrameDecoder:1842] spca50x->frame[i].height= 120

spca50x->frame[i].cameratype=12
spca50x->frame[i].scanlength=28800
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca50x_configure:2660] Spca5xx Configure done !!
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca5xx_probe:4185] setting video device = cfc42860, spca50x = cf350000
hub 1-0:1.0: state 5 ports 1 chg fffe evt 0006
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca5xx_open:1977] opening
/home/manju/TI-DAVINCI/gspcav1-20070508/Sunplus/spca561.h: [spca561_init:497] Find spca561 USB Product ID 92f
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca5xx_set_light_freq:1940] Sensor currently not support light frequency banding filters.
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca5xx_setFrameDecoder:1841] spca50x->frame[i].width =160

/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca5xx_setFrameDecoder:1842] spca50x->frame[i].height= 120

spca50x->frame[i].cameratype=12
spca50x->frame[i].scanlength=28800
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca5xx_setFrameDecoder:1841] spca50x->frame[i].width =160

/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca5xx_setFrameDecoder:1842] spca50x->frame[i].height= 120

spca50x->frame[i].cameratype=12
spca50x->frame[i].scanlength=28800
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [gspca_set_isoc_ep:902] test ISO EndPoint  129
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [gspca_set_isoc_ep:910] ISO EndPoint found 0x81 AlternateSet 7
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [gspca_init_transfert:996] packet rt from musb 1023
after pThis->aLocalEnd
nOut=0
bEnd=1
I am inside pEnd=-813682436
I am inside pEnd=-813682380
I am inside pEnd=-813682324
I am inside pEnd=-813682268
I am inside nBestEnd before null=-1
I am inside musb_host_1.c
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: init isoc: usb_submit_urb(0) ret -16
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca5xx_open:2006]  DEALLOC error on init_Isoc

/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca5xx_dealloc:1770] entered dealloc
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca5xx_dealloc:1783] buffer memory deallocated
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca5xx_dealloc:1786] leaving dealloc
/home/manju/TI-DAVINCI/gspcav1-20070508/gspca_core.c: [spca5xx_open:2021] Open failed
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Spca50x-devs mailing list
Spca50x-devs@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/spca50x-devs