Web lists-archives.org

Re: [Spca50x-devs] Aiptek DV4100M/DV3100/DV3500, kernel oops at dark light + dynamic lightswitches




Jon M. Lamb wrote:
> thomas schorpp wrote:
> 
>> Jon M. Lamb wrote:
>>  
>>
>>> thomas schorpp wrote:
>>>
>>>   
>>>
>>>> michel Xhaard wrote:
>>>>
>>>>
>>>>     
>>>>
>>>>> Le Jeudi 1 Juin 2006 17:57, Jon M. Lamb a écrit :
>>>>>
>>>>>  
>>>>>
>>>>>       
>>>>>
>>>>>> I have a Aiptek Pocket DV 4100M camera.  lsusb gives an ID of
>>>>>> 08ca:2040.  After trying several I  was able to get it working
>>>>>> with the
>>>>>> following bridge.
>>>>>>
>>>>>> case 0x2040:
>>>>>>
>>>>>>      spca50x->desc = AiptekDV4100M;
>>>>>>      spca50x->bridge = BRIDGE_SPCA536;
>>>>>>      spca50x->sensor = SENSOR_INTERNAL;
>>>>>>
>>>>>>      spca50x->cameratype = JPEG;
>>>>>>      info("USB SPCA5XX camera found. Aiptek DV4100M");
>>>>>>      memcpy(&spca50x->funct,&fsp5xxfw2,sizeof(struct cam_operation));
>>>>>>      break;
>>>>>>
>>>>>> I get an image and the pc is stable if I leave the camera pointing
>>>>>> outside.   (Tested for at least an hour) If I move the camera to
>>>>>> quickly
>>>>>> perhaps making the image become to dark as someone mentioned in a
>>>>>> previous post my PC freezes.  Was a solution found for this and is
>>>>>> there
>>>>>> something I should do to get this camera included in the driver?
>>>>>>
>>>>>> Jon
>>>>>>
>>>>>>            
>>>>>
>>>>> Jon,
>>>>> I will setup your patch for the next revision. Thanks for your
>>>>> feedback.
>>>>> The freeze seem to happen when the light come dark, that mean when
>>>>> the time exposure is very long and the frame rate slow . That seem
>>>>> strange, i suspect a chips fault. Did you have some errors in the
>>>>> /var/log/messages like timeout (error -110) ?
>>>>> regards
>>>>>  
>>>>>       
>>>>
>>>> Jon,
>>>> i get the same problems with the DV3500 since ~ kernel 2.6.15 with
>>>> this driver. google finds some statements about performance
>>>> enhancements in scheduler and software interrupt handling around this
>>>> release times. maybe the kernel guys have "overoptimized" it somehow.
>>>> from my view the kernel devs have optimize priorities for server linux
>>>> from the big guys (redhat, novell...) not desktop, so maybe dont
>>>> expect too much from LKML.
>>>>
>>>> 1. can we see a oops trace from You, pls?
>>>>
>>>>
>>>>     
>>>
>>> I am not sure I have an oops trace.  Where would this be located and/or
>>> a good howto on getting it?  There was nothing in /var/log/messages.
>>>   
>>
>>
>> go to runlevel 1, klogd doesnt get the oops if the kernel cant sync
>> again like in this case. read kernel debugging docs how to get a valid
>> oops trace on the web.
>> howtos are at kernelnewbies sites and around. using a null modem
>> serial cable to another host with the camera host with serial-console
>> boot option may be the best, this setup is described in
>> .../linux/documentation/serial-console. kernel messages and oops can
>> be captured with minicom e.g. on the remote host for later decode with
>> ksymoops back on the camera host, then.
>> beware you may have to modify /etc/inittab on the camera pc
>> respectively or you may be unable to log in in this mode then, i dont
>> know gentoo, ask their community for inittab, pls. ive got debian.
>>
>> ~$ su
>> ~# init 1
>> ~# cat /dev/video0 >> /dev/null
>> oops (sooner or later)
>>
>> pls report to spca50x-devs@xxxxxxxxxxxxxxxxxxxxx , not only to me.
>> alter the light exposure then the oops trace shows up in the console.
>> we cant do much without a valid ksymoops decoded backtrace.
>>
>>  
>>
> I think this is it.  I had a laptop with an earlier kernel.  I set the
> driver and camera up on that one.
> 
> ------------[ cut here ]------------
> kernel BUG at kernel/softirq.c:266!
> invalid operand: 0000 [#1]
> Modules linked in: spca5xx orinoco_cs orinoco hermes videodev
> CPU:    0
> EIP:    0060:[<c011a835>]    Not tainted VLI
> EFLAGS: 00010246   (2.6.12-gentoo-r6)
> EIP is at tasklet_action+0x35/0x70
> eax: 00000000   ebx: d36b8008   ecx: 00000003   edx: d36b8008
> esi: c04c63c8   edi: 0000000a   ebp: d7f5c400   esp: c048ff60
> ds: 007b   es: 007b   ss: 0068
> Process swapper (pid: 0, threadinfo=c048e000 task=c03f1b80)
> Stack: d36ba228 00000001 c011a5fb c04c63c8 00000046 d7f5c4bc c04be120
> c011a636
>       00000808 c0104c7e c0103146 00000808 0083a80c 00000808 d7f5c4bc
> c04be120
>       d7f5c400 0083b290 ffff007b 4279007b ffffff0b c0252ea9 00000060
> 00000216
> Call Trace:
> [<c011a5fb>] __do_softirq+0x7b/0x90
> [<c011a636>] do_softirq+0x26/0x30
> [<c0104c7e>] do_IRQ+0x1e/0x30
> [<c0103146>] common_interrupt+0x1a/0x20
> [<c0252ea9>] acpi_processor_idle+0x122/0x25e
> [<c01010f0>] cpu_idle+0x50/0x60
> [<c04907cb>] start_kernel+0x14b/0x170
> [<c0490380>] unknown_bootoption+0x0/0x1e0
> Code: 63 4c c0 89 0d 80 63 4c c0 fb 85 db 74 32 90 8d b4 26 00 00 00 00
> 89 da 8b 42 08 8b
> <0>Kernel panic - not syncing: Fatal exception in interrupt

yes. thats the BUG() stopper at line 266, thx.


		if (tasklet_trylock(t)) {
			if (!atomic_read(&t->count)) {
				if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state))
->>>>>>>>>>>>>>>>>>>>			BUG();
				t->func(t->data);
				tasklet_unlock(t);
				continue;
			}
			tasklet_unlock(t);
		}

suggest You compile a own kernel image from the gentoo .config with this patch, 
it mostly works here with ekiga and should for You too, if You avoid too dynamic lightchanges:

--- /usr/src/linux/kernel/softirq.c  2006-03-22 00:28:17.000000000 +0100
+++ /usr/src/linux/kernel/softirq.c  2006-03-22 11:19:06.000000000 +0100
@@ -262,8 +262,9 @@

                if (tasklet_trylock(t)) {
                        if (!atomic_read(&t->count)) {
-                               if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state))
-                                       BUG();
+                               test_and_clear_bit(TASKLET_STATE_SCHED, &t->state);
+//                             if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state))
+//                                     tasklet_kill(t);
                                t->func(t->data);
                                tasklet_unlock(t);
                                continue;

i use it for weeks now and no evil things showed up in my system.
it will take months yet to find the real cause... sorry.

> 
>> do You use flourescent light in your room (50/60Hz)?
>>  
>>
> No, but what about computer monitors (lcds tvs etc.)
> 

lcds are non-flickering i assume, crt monitors flicker with 60-120Hz...

>>  
>>
>>>> 2. manufacturing date of the DV device and usb hw pls (reports of chip
>>>> hw degration around).
>>>>
>>>>
>>>>     
>>>
>>> Not sure of date.  The only info on device or box is Aiptek DUO-V26 S/N
>>> BHI40098683.  Strangly or not...the box says Pocket DV 3100 but the
>>> Windows software/driver says 4100M.
>>>   
>>
>>
>> lazy driver .inf file ;) it is was the box says. DV 3100.
>> hmm your lsusb -v says 4100M maybe they use the same brigde...
>>
>>  
>>
>>>> 3. behaviour with m$ windos?
>>>>
>>>>
>>>>     
>>>
>>> Windows recognizes device as 4100M.  Device seems to work.  I was able
>>> to move the camera around and I could cover and uncover the lens with no
>>> apparent problems.
>>>
>>>   
>>>
>>>> 4. list all Your usb devices on the system, pls.
>>>>
>>>>
>>>>     
>>
>>
>> usb uhci like me too, ok.
>> manufacturer and type of usb root hub pls, use lspci (without -v), thx.
>> i beg its VIA inc.
>>
>>  
>>
> This is on the system with the above Oops
> # lspci

ok, intel usb. i use VIA and older intel, so the fault is host hw independend, thx.

> 
>>>> 5. is your kernel preemtible (schorpp@tom1:~$ uname -a
>>>> Linux tom1.schorpp.dyndns.dk 2.6.16.18 #4 PREEMPT Tue May 23 15:35:59
>>>> CEST 2006 i686 GNU/Linux
>>>> ) ?
>>>>
>>>>
>>>>     
>>>
>>> Linux stella 2.6.15-gentoo-r1 #7 SMP PREEMPT Tue Mar 28 20:13:27 EST
>>> 2006 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 2.00GHz GNU/Linux
>>>
>>>   
>>
>>
>> preemtible like me too, ok. why are You using a SMP kernel? this seems
>> to be a single core single mobile cpu...? try bulding spca on a
>> non-preemtible single processor kernel image if availlable in gentoo
>> and possible and report, thx.
>>  
>>
> The system with the above Oops
> Linux della 2.6.12-gentoo-r6 #4 Sun Jun 4 01:12:32 UTC 2006 i686 Pentium
> III (Coppermine) x
> 
> It seems that SMP is the default in the config that  came  with my
> gentoo sources (all three systems had SMP kernels).
> 
> Is this information ok?

yes, thx. so its SMP and preempt independend, ok. 

> 
> Jon

tom

> 
>> interesting.



_______________________________________________
Spca50x-devs mailing list
Spca50x-devs@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/spca50x-devs