Re: [RFC/RFT 0/14] radio-mr800 patch series
On Tue, Sep 22, 2009 at 5:06 AM, David Ellingsworth da...@identd.dyndns.org wrote: On Mon, Sep 21, 2009 at 8:03 PM, Alexey Klimov klimov.li...@gmail.com wrote: Hello, David On Mon, Sep 14, 2009 at 11:09 PM, Alexey Klimov klimov.li...@gmail.com wrote: Hello David, On Sun, Sep 13, 2009 at 7:22 AM, David Ellingsworth da...@identd.dyndns.org wrote: What follow is a series of patches to clean up the radio-mr800 driver. I do _not_ have access to this device so these patches need to be tested. These patches should apply to Mauro's git tree and against the 2.6.31 release kernel. The patches in this series are as follows: 01. radio-mr800: implement proper locking 02. radio-mr800: simplify video_device allocation 03. radio-mr800: simplify error paths in usb probe callback 04. radio-mr800: remove an unnecessary local variable 05. radio-mr800: simplify access to amradio_device 06. radio-mr800: simplify locking in ioctl callbacks 07. radio-mr800: remove device-removed indicator 08. radio-mr800: fix potential use after free 09. radio-mr800: remove device initialization from open/close 10. radio-mr800: ensure the radio is initialized to a consistent state 11. radio-mr800: fix behavior of set_radio function 12. radio-mr800: preserve radio state during suspend/resume 13. radio-mr800: simplify device warnings 14. radio-mr800: set radio frequency only upon success The first 7 in this series are the same as those submitted in my last series and will not be resent. The remaining 7 patches in this series will be sent separately for review. I applied your patches and tested radio device. Radio works fine, but unfortunately sudden disconnect while playing radio with gnomeradio creates troubles. I see such oops in dmesg: radio_mr800: version 0.11-david AverMedia MR 800 USB FM radio driver usb 2-2: new low speed USB device using ohci_hcd and address 16 usb 2-2: New USB device found, idVendor=07ca, idProduct=b800 usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 2-2: Product: AVerMedia USB Radio usb 2-2: Manufacturer: AVerMedia Technologies usb 2-2: configuration #1 chosen from 1 choice radio-mr800 2-2:1.0: Non-NULL drvdata on register usb 2-2: USB disconnect, address 16 BUG: unable to handle kernel NULL pointer dereference at 009f IP: [8119222b] dev_set_drvdata+0x25/0x30 PGD 3c0e1067 PUD 33b1d067 PMD 0 Oops: 0002 [#1] SMP last sysfs file: /sys/devices/pci:00/:00:02.0/usb2/2-2/2-2:1.0/uevent CPU 1 Modules linked in: radio_mr800 v4l2_common videodev v4l1_compat v4l2_compat_ioctl32 nls_iso8859_1 nls_cp437 vfat fat usb_storage nls_utf8 cifs ext2 ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables ppp_async crc_ccitt ppp_generic slhc cpufreq_powersave powernow_k8 freq_table snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss reiserfs usbhid hid snd_hda_codec_analog snd_hda_intel ohci_hcd ehci_hcd snd_hda_codec snd_hwdep snd_pcm snd_timer nvidia(P) snd usbcore soundcore snd_page_alloc rtc_cmos sg rtc_core rtc_lib i2c_nforce2 forcedeth e100 nls_base k8temp mii i2c_core hwmon thermal button [last unloaded: v4l2_compat_ioctl32] Pid: 11790, comm: gnomeradio Tainted: P 2.6.31 #12 System Product Name RIP: 0010:[8119222b] [8119222b] dev_set_drvdata+0x25/0x30 RSP: 0018:880031741e28 EFLAGS: 00010206 RAX: 0017 RBX: 88003c3a4030 RCX: 8109458a RDX: RSI: RDI: 88003c3a4030 RBP: R08: R09: R10: 880029391e70 R11: 0246 R12: 81349ec0 R13: 880029391e70 R14: 8800173d7000 R15: 88003fac8300 FS: 7fa0f88e3750() GS:88000290() knlGS:f7327a10 CS: 0010 DS: ES: CR0: 80050033 CR2: 009f CR3: 3165c000 CR4: 06e0 DR0: DR1: DR2: DR3: DR6: 0ff0 DR7: 0400 Process gnomeradio (pid: 11790, threadinfo 88003174, task 88003bcc5820) Stack: 8800173d7000 88003c3a5a60 88003c3a5a60 a0c603cb 0 88003c3a5800 a0c603e5 88003c3a5800 88003e400890 0 81349ec0 a000d5c7 8800331593c0 8118fb37 Call Trace: [a0c603cb] ? v4l2_device_disconnect+0x13/0x1c [videodev] [a0c603e5] ? v4l2_device_unregister+0x11/0x4b [videodev] [a000d5c7] ? usb_amradio_video_device_release+0x11/0x26 [radio_mr800] [8118fb37] ? device_release+0x41/0x6a [81118bf3] ? kobject_release+0x48/0x5e [81118bab] ? kobject_release+0x0/0x5e [811198ad] ? kref_put+0x41/0x4a [a0c5c2f3] ? v4l2_release+0x33/0x37 [videodev] [81092dfd] ? __fput+0x100/0x1c9 [81090538] ? filp_close+0x5f/0x6a
Re: [RFC/RFT 0/14] radio-mr800 patch series
Hello Alexey, On Wed, 23 Sep 2009 03:43:55 +0400 Alexey Klimov klimov.li...@gmail.com wrote: On Tue, Sep 22, 2009 at 5:06 AM, David Ellingsworth da...@identd.dyndns.org wrote: On Mon, Sep 21, 2009 at 8:03 PM, Alexey Klimov klimov.li...@gmail.com wrote: Hello, David On Mon, Sep 14, 2009 at 11:09 PM, Alexey Klimov klimov.li...@gmail.com wrote: Hello David, On Sun, Sep 13, 2009 at 7:22 AM, David Ellingsworth da...@identd.dyndns.org wrote: What follow is a series of patches to clean up the radio-mr800 driver. I do _not_ have access to this device so these patches need to be tested. These patches should apply to Mauro's git tree and against the 2.6.31 release kernel. The patches in this series are as follows: 01. radio-mr800: implement proper locking 02. radio-mr800: simplify video_device allocation 03. radio-mr800: simplify error paths in usb probe callback 04. radio-mr800: remove an unnecessary local variable 05. radio-mr800: simplify access to amradio_device 06. radio-mr800: simplify locking in ioctl callbacks 07. radio-mr800: remove device-removed indicator 08. radio-mr800: fix potential use after free 09. radio-mr800: remove device initialization from open/close 10. radio-mr800: ensure the radio is initialized to a consistent state 11. radio-mr800: fix behavior of set_radio function 12. radio-mr800: preserve radio state during suspend/resume 13. radio-mr800: simplify device warnings 14. radio-mr800: set radio frequency only upon success The first 7 in this series are the same as those submitted in my last series and will not be resent. The remaining 7 patches in this series will be sent separately for review. I applied your patches and tested radio device. Radio works fine, but unfortunately sudden disconnect while playing radio with gnomeradio creates troubles. I see such oops in dmesg: radio_mr800: version 0.11-david AverMedia MR 800 USB FM radio driver usb 2-2: new low speed USB device using ohci_hcd and address 16 usb 2-2: New USB device found, idVendor=07ca, idProduct=b800 usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 2-2: Product: AVerMedia USB Radio usb 2-2: Manufacturer: AVerMedia Technologies usb 2-2: configuration #1 chosen from 1 choice radio-mr800 2-2:1.0: Non-NULL drvdata on register usb 2-2: USB disconnect, address 16 BUG: unable to handle kernel NULL pointer dereference at 009f IP: [8119222b] dev_set_drvdata+0x25/0x30 PGD 3c0e1067 PUD 33b1d067 PMD 0 Oops: 0002 [#1] SMP last sysfs file: /sys/devices/pci:00/:00:02.0/usb2/2-2/2-2:1.0/uevent CPU 1 Modules linked in: radio_mr800 v4l2_common videodev v4l1_compat v4l2_compat_ioctl32 nls_iso8859_1 nls_cp437 vfat fat usb_storage nls_utf8 cifs ext2 ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables ppp_async crc_ccitt ppp_generic slhc cpufreq_powersave powernow_k8 freq_table snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss reiserfs usbhid hid snd_hda_codec_analog snd_hda_intel ohci_hcd ehci_hcd snd_hda_codec snd_hwdep snd_pcm snd_timer nvidia(P) snd usbcore soundcore snd_page_alloc rtc_cmos sg rtc_core rtc_lib i2c_nforce2 forcedeth e100 nls_base k8temp mii i2c_core hwmon thermal button [last unloaded: v4l2_compat_ioctl32] Pid: 11790, comm: gnomeradio Tainted: P 2.6.31 #12 System Product Name RIP: 0010:[8119222b] [8119222b] dev_set_drvdata+0x25/0x30 RSP: 0018:880031741e28 EFLAGS: 00010206 RAX: 0017 RBX: 88003c3a4030 RCX: 8109458a RDX: RSI: RDI: 88003c3a4030 RBP: R08: R09: R10: 880029391e70 R11: 0246 R12: 81349ec0 R13: 880029391e70 R14: 8800173d7000 R15: 88003fac8300 FS: 7fa0f88e3750() GS:88000290() knlGS:f7327a10 CS: 0010 DS: ES: CR0: 80050033 CR2: 009f CR3: 3165c000 CR4: 06e0 DR0: DR1: DR2: DR3: DR6: 0ff0 DR7: 0400 Process gnomeradio (pid: 11790, threadinfo 88003174, task 88003bcc5820) Stack: 8800173d7000 88003c3a5a60 88003c3a5a60 a0c603cb 0 88003c3a5800 a0c603e5 88003c3a5800 88003e400890 0 81349ec0 a000d5c7 8800331593c0 8118fb37 Call Trace: [a0c603cb] ? v4l2_device_disconnect+0x13/0x1c [videodev] [a0c603e5] ? v4l2_device_unregister+0x11/0x4b [videodev] [a000d5c7] ? usb_amradio_video_device_release+0x11/0x26 [radio_mr800] [8118fb37] ? device_release+0x41/0x6a [81118bf3] ? kobject_release+0x48/0x5e [81118bab] ? kobject_release+0x0/0x5e
Re: [RFC/RFT 0/14] radio-mr800 patch series
On Mon, Sep 21, 2009 at 8:03 PM, Alexey Klimov klimov.li...@gmail.com wrote: Hello, David On Mon, Sep 14, 2009 at 11:09 PM, Alexey Klimov klimov.li...@gmail.com wrote: Hello David, On Sun, Sep 13, 2009 at 7:22 AM, David Ellingsworth da...@identd.dyndns.org wrote: What follow is a series of patches to clean up the radio-mr800 driver. I do _not_ have access to this device so these patches need to be tested. These patches should apply to Mauro's git tree and against the 2.6.31 release kernel. The patches in this series are as follows: 01. radio-mr800: implement proper locking 02. radio-mr800: simplify video_device allocation 03. radio-mr800: simplify error paths in usb probe callback 04. radio-mr800: remove an unnecessary local variable 05. radio-mr800: simplify access to amradio_device 06. radio-mr800: simplify locking in ioctl callbacks 07. radio-mr800: remove device-removed indicator 08. radio-mr800: fix potential use after free 09. radio-mr800: remove device initialization from open/close 10. radio-mr800: ensure the radio is initialized to a consistent state 11. radio-mr800: fix behavior of set_radio function 12. radio-mr800: preserve radio state during suspend/resume 13. radio-mr800: simplify device warnings 14. radio-mr800: set radio frequency only upon success The first 7 in this series are the same as those submitted in my last series and will not be resent. The remaining 7 patches in this series will be sent separately for review. I applied your patches and tested radio device. Radio works fine, but unfortunately sudden disconnect while playing radio with gnomeradio creates troubles. I see such oops in dmesg: radio_mr800: version 0.11-david AverMedia MR 800 USB FM radio driver usb 2-2: new low speed USB device using ohci_hcd and address 16 usb 2-2: New USB device found, idVendor=07ca, idProduct=b800 usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 2-2: Product: AVerMedia USB Radio usb 2-2: Manufacturer: AVerMedia Technologies usb 2-2: configuration #1 chosen from 1 choice radio-mr800 2-2:1.0: Non-NULL drvdata on register usb 2-2: USB disconnect, address 16 BUG: unable to handle kernel NULL pointer dereference at 009f IP: [8119222b] dev_set_drvdata+0x25/0x30 PGD 3c0e1067 PUD 33b1d067 PMD 0 Oops: 0002 [#1] SMP last sysfs file: /sys/devices/pci:00/:00:02.0/usb2/2-2/2-2:1.0/uevent CPU 1 Modules linked in: radio_mr800 v4l2_common videodev v4l1_compat v4l2_compat_ioctl32 nls_iso8859_1 nls_cp437 vfat fat usb_storage nls_utf8 cifs ext2 ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables ppp_async crc_ccitt ppp_generic slhc cpufreq_powersave powernow_k8 freq_table snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss reiserfs usbhid hid snd_hda_codec_analog snd_hda_intel ohci_hcd ehci_hcd snd_hda_codec snd_hwdep snd_pcm snd_timer nvidia(P) snd usbcore soundcore snd_page_alloc rtc_cmos sg rtc_core rtc_lib i2c_nforce2 forcedeth e100 nls_base k8temp mii i2c_core hwmon thermal button [last unloaded: v4l2_compat_ioctl32] Pid: 11790, comm: gnomeradio Tainted: P 2.6.31 #12 System Product Name RIP: 0010:[8119222b] [8119222b] dev_set_drvdata+0x25/0x30 RSP: 0018:880031741e28 EFLAGS: 00010206 RAX: 0017 RBX: 88003c3a4030 RCX: 8109458a RDX: RSI: RDI: 88003c3a4030 RBP: R08: R09: R10: 880029391e70 R11: 0246 R12: 81349ec0 R13: 880029391e70 R14: 8800173d7000 R15: 88003fac8300 FS: 7fa0f88e3750() GS:88000290() knlGS:f7327a10 CS: 0010 DS: ES: CR0: 80050033 CR2: 009f CR3: 3165c000 CR4: 06e0 DR0: DR1: DR2: DR3: DR6: 0ff0 DR7: 0400 Process gnomeradio (pid: 11790, threadinfo 88003174, task 88003bcc5820) Stack: 8800173d7000 88003c3a5a60 88003c3a5a60 a0c603cb 0 88003c3a5800 a0c603e5 88003c3a5800 88003e400890 0 81349ec0 a000d5c7 8800331593c0 8118fb37 Call Trace: [a0c603cb] ? v4l2_device_disconnect+0x13/0x1c [videodev] [a0c603e5] ? v4l2_device_unregister+0x11/0x4b [videodev] [a000d5c7] ? usb_amradio_video_device_release+0x11/0x26 [radio_mr800] [8118fb37] ? device_release+0x41/0x6a [81118bf3] ? kobject_release+0x48/0x5e [81118bab] ? kobject_release+0x0/0x5e [811198ad] ? kref_put+0x41/0x4a [a0c5c2f3] ? v4l2_release+0x33/0x37 [videodev] [81092dfd] ? __fput+0x100/0x1c9 [81090538] ? filp_close+0x5f/0x6a [810905d4] ? sys_close+0x91/0xc4 [8100ad6b] ? system_call_fastpath+0x16/0x1b
Re: [RFC/RFT 0/14] radio-mr800 patch series
Hello David, On Sun, Sep 13, 2009 at 7:22 AM, David Ellingsworth da...@identd.dyndns.org wrote: What follow is a series of patches to clean up the radio-mr800 driver. I do _not_ have access to this device so these patches need to be tested. These patches should apply to Mauro's git tree and against the 2.6.31 release kernel. The patches in this series are as follows: 01. radio-mr800: implement proper locking 02. radio-mr800: simplify video_device allocation 03. radio-mr800: simplify error paths in usb probe callback 04. radio-mr800: remove an unnecessary local variable 05. radio-mr800: simplify access to amradio_device 06. radio-mr800: simplify locking in ioctl callbacks 07. radio-mr800: remove device-removed indicator 08. radio-mr800: fix potential use after free 09. radio-mr800: remove device initialization from open/close 10. radio-mr800: ensure the radio is initialized to a consistent state 11. radio-mr800: fix behavior of set_radio function 12. radio-mr800: preserve radio state during suspend/resume 13. radio-mr800: simplify device warnings 14. radio-mr800: set radio frequency only upon success The first 7 in this series are the same as those submitted in my last series and will not be resent. The remaining 7 patches in this series will be sent separately for review. Regards, David Ellingsworth Thank you for work at radio-mr800. I'll check and test your patches as soon as possible, it probably takes 2-3 days. -- Best regards, Klimov Alexey -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RFC/RFT 0/14] radio-mr800 patch series
What follow is a series of patches to clean up the radio-mr800 driver. I do _not_ have access to this device so these patches need to be tested. These patches should apply to Mauro's git tree and against the 2.6.31 release kernel. The patches in this series are as follows: 01. radio-mr800: implement proper locking 02. radio-mr800: simplify video_device allocation 03. radio-mr800: simplify error paths in usb probe callback 04. radio-mr800: remove an unnecessary local variable 05. radio-mr800: simplify access to amradio_device 06. radio-mr800: simplify locking in ioctl callbacks 07. radio-mr800: remove device-removed indicator 08. radio-mr800: fix potential use after free 09. radio-mr800: remove device initialization from open/close 10. radio-mr800: ensure the radio is initialized to a consistent state 11. radio-mr800: fix behavior of set_radio function 12. radio-mr800: preserve radio state during suspend/resume 13. radio-mr800: simplify device warnings 14. radio-mr800: set radio frequency only upon success The first 7 in this series are the same as those submitted in my last series and will not be resent. The remaining 7 patches in this series will be sent separately for review. Regards, David Ellingsworth -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html