Hi David,

Yeah, I did some similar tests like the one you described a while ago, 
and I remember I got a similar behavior as the one you experienced :) 
There is also the suspend/resume use case which should also be 
investigated... Anyway, as a first suggestion, maybe we should not call 
usb_set_interface when releasing the v4l device.. However I've seen that 
such a call is made in other drivers to "reset" the USB communication 
since the endpoint 0 means that no further exchange between the host and 
cam are planned anymore (so it has to be done at some point). This 
definitely needs more investigation.

Regards,
Ilyes Gouta.

David Sharp wrote:
> Hi all,
> 
> I got the below GPF when i followed these steps:
> 
> 0.  livecam is running happily
> 1.  disconnect camera
> 2.  reconnect camera
> 3.  close livecam, which has a frozen image.
> 
> I'm using the m5603-mt9v011 branch with my "Creative WebCam Live! Pro"
> 
> unfortunately, I didn't have any debug options on, so the output isn't
> as verbose as it could be. I might try to reproduce it tomorrow with
> more debugging on.
> 
> Thanks,
> d#
> 
> usb 1-1: USB disconnect, address 4
> usb 1-1: new high speed USB device using ehci_hcd and address 5
> usb 1-1: configuration #1 chosen from 1 choice
> general protection fault: 0000 [1] PREEMPT
> CPU 0
> Modules linked in: m5603c videodev v4l2_common v4l1_compat it87
> hwmon_vid eeprom ds1621 nvidia(P) parport_pc parport k8temp
> i2c_nforce2
> Pid: 19439, comm: livecam Tainted: P        2.6.24-gentoo-r3 #3
> RIP: 0010:[<ffffffff804c0472>]  [<ffffffff804c0472>] usb_ifnum_to_if+0x12/0x60
> RSP: 0018:ffff81000e0bfe00  EFLAGS: 00010202
> RAX: 00000000ffffff8f RBX: ffff81002f46c000 RCX: ffffffff887f559a
> RDX: 0380002e0005033b RSI: 0000000000000000 RDI: ffff81002f46c000
> RBP: 0000000000000000 R08: 0000000000000000 R09: ffff810001e00140
> R10: 0000000000000002 R11: 00000000000002a7 R12: 0000000000000000
> R13: ffff81001e556600 R14: ffff81003e8a1900 R15: 0000000000000000
> FS:  00002b4bc7109c70(0000) GS:ffffffff8074a000(0000) knlGS:00000000f5e0eb90
> CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> CR2: 00002b4bc6457cb0 CR3: 0000000008c13000 CR4: 00000000000006e0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> Process livecam (pid: 19439, threadinfo ffff81000e0be000, task 
> ffff81003bd68e60)
> Stack:  ffffffff804c8883 ffff810009b30388 ffff81001e556600 ffff81003e8a1900
>  0000000000000282 ffff8100092ec000 ffff8100092edb48 ffff810009b30388
>  ffff81001e556600 ffff81003e8a1900 ffffffff887f94e0 0000000000000008
> Call Trace:
>  [<ffffffff804c8883>] usb_set_interface+0x53/0x1c0
>  [<ffffffff887f94e0>] :m5603c:v4l_m5603c_release+0xc0/0xf0
>  [<ffffffff8028e4c1>] __fput+0xb1/0x1f0
>  [<ffffffff8028b324>] filp_close+0x54/0x90
>  [<ffffffff80232fb9>] put_files_struct+0xe9/0x120
>  [<ffffffff8023460e>] do_exit+0x17e/0x8f0
>  [<ffffffff80234dad>] do_group_exit+0x2d/0xa0
>  [<ffffffff8020bb4e>] system_call+0x7e/0x83
> 
> 
> Code: 44 0f b6 42 04 45 85 c0 7e f0 48 8b 8a 98 00 00 00 31 ff 48
> RIP  [<ffffffff804c0472>] usb_ifnum_to_if+0x12/0x60
>  RSP <ffff81000e0bfe00>
> ---[ end trace 93c31bedf2361d17 ]---
> Fixing recursive fault but reboot is needed!
> 
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> M560x-driver-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/m560x-driver-devel

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
M560x-driver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/m560x-driver-devel

Reply via email to