I agree too... I tested out both patches Mauro and trents patches. I did not get any ops, and tested the patches for about three hours. I did not have the device removed, so I would assume it the dummy device definition that's causing the problem.
I vote that we should get rid of the dummy device. It's always caused a great deal of headaches. We should probably set it up like the saa7134 devices. ----- Original Message ---- From: Thierry MERLE <[EMAIL PROTECTED]> To: Mauro Carvalho Chehab <[EMAIL PROTECTED]> Cc: Dwaine Garden <[EMAIL PROTECTED]>; Linux and Kernel Video <[EMAIL PROTECTED]>; Linux DVB <linux-dvb@linuxtv.org> Sent: Saturday, April 14, 2007 1:26:19 PM Subject: [linux-dvb] Re: [Patch] USBVision - Fix NT1005 Bridge detection Mauro Carvalho Chehab a écrit : > Hi Dwaine and Thierry, > > > The patch seems to be ok. However, it is not nice to do this: > > >> + if ((!strcmp(usbvision_device_data[model].ModelString, "Dazzle >> Fusion Model DVC-90 Rev 1 (SECAM)")) && >> > > Since, if for some reason, people decide to change the comment at > usbvision-cards, it will break the above code. Instead, it is better to > create a code for each board and for its value. > > I've did such change on: > http://linuxtv.org/hg/~mchehab/usbvision > > It also honors CodingStyle max line size. > > I've also removed some duplicated stuff (ID Vendor/Product) and changed > some flags to use bitmap. As result, It saved about 1K of kernelspace > area. > > I also noticed that the same name string were used for more than one > board. So, I've added a number for the duplicated names to avoid having > the same name for two different boards. It would be better, however, to > replace the duplicated definitions to a proper one, or to merge the > entries, if they are just referring to the same board. > > May you test it and comment? > > Acked-by: Thierry MERLE <[EMAIL PROTECTED]> I agree totally with this simplification. I am currently debugging the Trent's patch that makes a kernel oops and I don't know why. The usbvision_probe is called event if the device is not plugged, and the kernel oops occurs on this piece of code: model = devid->driver_info; printk(KERN_INFO "%s: %s found\n", __FUNCTION__, usbvision_device_data[model].ModelString); Memory alignment problem ? Why this probe is called even if there is no device plugged-in ? By putting something like: model = devid->driver_info; if(model<0 || model >HPG_WINTV) { printk(KERN_INFO "model out of bounds %d\n",model); return -ENODEV; } else printk(KERN_INFO "model is %d\n",model); The problem disappeared... Regards, Thierry Apr 14 18:17:10 localhost kernel: BUG: unable to handle kernel paging request at virtual address 0917ab30 Apr 14 18:17:10 localhost kernel: printing eip: Apr 14 18:17:10 localhost kernel: c01d837b Apr 14 18:17:10 localhost kernel: *pde = 00000000 Apr 14 18:17:10 localhost kernel: Oops: 0000 [#1] Apr 14 18:17:10 localhost kernel: Modules linked in: usbvision videodev tuner v4l2_common snd_pcm_oss snd_mixer_oss cpufreq_conservative cinergyT2 dvb_core mga drm ns558 analog joydev nvidia(P) snd_hda_intel snd_hda_codec snd_pcm snd_timer snd snd_page_alloc Apr 14 18:17:10 localhost kernel: CPU: 0 Apr 14 18:17:10 localhost kernel: EIP: 0060:[<c01d837b>] Tainted: P VLI Apr 14 18:17:10 localhost kernel: EFLAGS: 00210097 (2.6.21-rc6 #7) Apr 14 18:17:10 localhost kernel: EIP is at vsnprintf+0x2d1/0x4d3 Apr 14 18:17:10 localhost kernel: eax: 0917ab30 ebx: c03f01b4 ecx: 0917ab30 edx: fffffffe Apr 14 18:17:10 localhost kernel: esi: c75ebe7c edi: 0000000a ebp: ffffffff esp: c75ebd98 Apr 14 18:17:10 localhost kernel: ds: 007b es: 007b fs: 00d8 gs: 0033 ss: 0068 Apr 14 18:17:10 localhost kernel: Process modprobe (pid: 4759, ti=c75ea000 task=e24e6520 task.ti=c75ea000) Apr 14 18:17:10 localhost kernel: Stack: e7dde000 ead775e0 584da500 ead775e0 c03ef3e0 ead775e0 ffffffff ffffffff Apr 14 18:17:10 localhost kernel: 00000000 c03f05a0 00000400 c03f01a0 ed0edf6f 00000400 eb9c6400 c03f01a0 Apr 14 18:17:10 localhost kernel: ea412fa0 c01d858f c75ebe74 e49c9b70 c0117ec8 c75ebe74 ebc3fc18 00000001 Apr 14 18:17:10 localhost kernel: Call Trace: Apr 14 18:17:10 localhost kernel: [<c01d858f>] vscnprintf+0x12/0x1d Apr 14 18:17:10 localhost kernel: [<c0117ec8>] vprintk+0x4d/0x1f3 Apr 14 18:17:10 localhost kernel: [<c0177830>] __sysfs_new_dirent+0x12/0x40 Apr 14 18:17:10 localhost kernel: [<c017791a>] __sysfs_make_dirent+0x11/0x6c Apr 14 18:17:10 localhost kernel: [<c0117e78>] printk+0x16/0x19 Apr 14 18:17:10 localhost kernel: [<ed0eaa40>] usbvision_probe+0x9a/0x3f6 [usbvision] Apr 14 18:17:10 localhost kernel: [<c02665e2>] usb_probe_interface+0x66/0x88 Apr 14 18:17:10 localhost kernel: [<c022fc9c>] really_probe+0x9c/0x12e Apr 14 18:17:10 localhost kernel: [<c0266893>] usb_match_id+0x34/0x42 Apr 14 18:17:10 localhost kernel: [<c022fde0>] driver_probe_device+0xa3/0xaf Apr 14 18:17:10 localhost kernel: [<c02e78f6>] klist_next+0x48/0x6e Apr 14 18:17:10 localhost kernel: [<c022fe52>] __driver_attach+0x0/0x75 Apr 14 18:17:10 localhost kernel: [<c022fe96>] __driver_attach+0x44/0x75 Apr 14 18:17:10 localhost kernel: [<c022f304>] bus_for_each_dev+0x35/0x59 Apr 14 18:17:10 localhost kernel: [<c022fedb>] driver_attach+0x14/0x16 Apr 14 18:17:10 localhost kernel: [<c022fe52>] __driver_attach+0x0/0x75 Apr 14 18:17:10 localhost kernel: [<c022f748>] bus_add_driver+0x5a/0xe0 Apr 14 18:17:10 localhost kernel: [<c0266cc1>] usb_register_driver+0x65/0xb8 Apr 14 18:17:10 localhost kernel: [<eca5b11b>] usbvision_init+0x11b/0x161 [usbvision] Apr 14 18:17:10 localhost kernel: [<c012f0b7>] sys_init_module+0x89/0x133 Apr 14 18:17:10 localhost kernel: [<c0103ac0>] syscall_call+0x7/0xb Apr 14 18:17:10 localhost kernel: ======================= Apr 14 18:17:10 localhost kernel: Code: 01 00 00 3b 5c 24 24 73 f0 c6 03 20 eb eb 89 f0 83 c6 04 8b 54 24 1c 8b 08 b8 c2 f7 34 c0 81 f9 ff 0f 00 00 0f 46 c8 89 c8 eb 06 <80> 38 00 74 07 40 4a 83 fa ff 75 f4 29 c8 f6 44 24 20 10 89 c7 Apr 14 18:17:10 localhost kernel: EIP: [<c01d837b>] vsnprintf+0x2d1/0x4d3 SS:ESP 0068:c75ebd98 _______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
_______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb