All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] crystalhd git.linuxtv.org kernel driver: unable to handle kernel paging requests, improper (spin)locking(?) and paging
@ 2013-01-02  7:48 thomas schorpp
  2013-01-03 15:17 ` Oliver Schinagl
  0 siblings, 1 reply; 11+ messages in thread
From: thomas schorpp @ 2013-01-02  7:48 UTC (permalink / raw)
  To: linux-media; +Cc: j, jarod

Hello guys,

I'm working on supporting BCM 970012/15 crystalhd decoder in userspace video/tv apps and

can't find where to report bugs of

http://git.linuxtv.org/jarod/crystalhd.git
<devinheitmueller> I think he just borrowed our git server.

So I borrow this list to get more developers, testers and sw- quality guys in.

Forgot to mention the attached Oopses under high load and "multithreading" in half automated stress/mass testing.

Scenario e.g.:
Dec 29 15:58:29 vdr1 kernel: [ 5698.364950] crystalhd 0000:02:00.0: Opening new user[0] handle
Dec 29 15:58:30 vdr1 kernel: [ 5698.557932] crystalhd 0000:02:00.0: Opening new user[0] handle
Dec 29 15:58:30 vdr1 kernel: [ 5698.846312] crystalhd 0000:02:00.0: Close the handle first..

Looks like the driver is not "threadsave", rebuilding kernel with spinlock debugging, should show more up.

y
tom

-Att: Kernel OOPS bt, etc

Dec 29 15:56:10 vdr1 kernel: [ 5558.568671] BUG: unable to handle kernel paging request at 2062696c
Dec 29 15:56:10 vdr1 kernel: [ 5558.568678] IP: [<2062696c>] 0x2062696b
Dec 29 15:56:10 vdr1 kernel: [ 5558.568681] *pdpt = 0000000008497001 *pde = 0000000000000000
Dec 29 15:56:10 vdr1 kernel: [ 5558.568684] Oops: 0010 [#4] PREEMPT
Dec 29 15:56:10 vdr1 kernel: [ 5558.568731] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core snd_seq_midi_even
t tveeprom videobuf_dma_sg
Dec 29 15:56:10 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
Dec 29 15:56:10 vdr1 kernel: [ 5558.568770] Pid: 11841, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
Dec 29 15:56:10 vdr1 kernel: [ 5558.568772] EIP: 0060:[<2062696c>] EFLAGS: 00010286 CPU: 0
Dec 29 15:56:10 vdr1 kernel: [ 5558.568775] EIP is at 0x2062696c
Dec 29 15:56:10 vdr1 kernel: [ 5558.568777] EAX: 00370042 EBX: c843c000 ECX: 636e3800 EDX: 00001c10
Dec 29 15:56:10 vdr1 kernel: [ 5558.568778] ESI: 000238fc EDI: fb0068fc EBP: c842dea8 ESP: c842de74
Dec 29 15:56:10 vdr1 kernel: [ 5558.568780]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Dec 29 15:56:10 vdr1 kernel: [ 5558.568781] CR0: 8005003b CR2: 2062696c CR3: 084d9000 CR4: 000007f0
Dec 29 15:56:10 vdr1 kernel: [ 5558.568783] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
Dec 29 15:56:10 vdr1 kernel: [ 5558.568784] DR6: ffff0ff0 DR7: 00000400
Dec 29 15:56:10 vdr1 kernel: [ 5558.568786] Process mplayer (pid: 11841, ti=c842c000 task=f0aba940 task.ti=c842c000)
Dec 29 15:56:10 vdr1 kernel: [ 5558.568787] Stack:
Dec 29 15:56:10 vdr1 kernel: [ 5558.568793]  fa18a569 ffffff10 c117e3f6 00000060 00010246 002a8464 f7138064 fafe3000
Dec 29 15:56:10 vdr1 kernel: [ 5558.568798]  002a8440 c117e811 f5920988 fafe3000 c843c000 c842ded8 fa18564d c842ded8
Dec 29 15:56:10 vdr1 kernel: [ 5558.568803]  fa182597 f595a400 f595a62c c842ded8 fa182977 002a8464 f5920900 f595a400
Dec 29 15:56:10 vdr1 kernel: [ 5558.568804] Call Trace:
Dec 29 15:56:10 vdr1 kernel: [ 5558.568818]  [<fa18a569>] ? crystalhd_link_download_fw+0x189/0x300 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568823]  [<c117e3f6>] ? __copy_from_user_ll+0xd6/0xf0
Dec 29 15:56:10 vdr1 kernel: [ 5558.568828]  [<c117e811>] ? _copy_from_user+0x41/0xb0
Dec 29 15:56:10 vdr1 kernel: [ 5558.568839]  [<fa18564d>] bc_cproc_download_fw+0xed/0x150 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568846]  [<fa182597>] ? chd_dec_proc_user_data+0x237/0x320 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568854]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568861]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568870]  [<fa185560>] ? bc_proc_in_completion+0x70/0x70 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568877]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568881]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
Dec 29 15:56:10 vdr1 kernel: [ 5558.568886]  [<c10685ef>] ? ktime_get+0x6f/0xf0
Dec 29 15:56:10 vdr1 kernel: [ 5558.568891]  [<c101ca56>] ? lapic_next_event+0x16/0x20
Dec 29 15:56:10 vdr1 kernel: [ 5558.568895]  [<c106f287>] ? clockevents_program_event+0xe7/0x130
Dec 29 15:56:10 vdr1 kernel: [ 5558.568898]  [<c10e4ab8>] ? fget_light+0xe8/0x120
Dec 29 15:56:10 vdr1 kernel: [ 5558.568901]  [<c10e4ad1>] ? fget_light+0x101/0x120
Dec 29 15:56:10 vdr1 kernel: [ 5558.568904]  [<c10e4a30>] ? fget_light+0x60/0x120
Dec 29 15:56:10 vdr1 kernel: [ 5558.568906]  [<c10f43cd>] sys_ioctl+0x2d/0x60
Dec 29 15:56:10 vdr1 kernel: [ 5558.568910]  [<c137238c>] sysenter_do_call+0x12/0x32
Dec 29 15:56:10 vdr1 kernel: [ 5558.568914]  [<c1360000>] ? asus_hides_smbus_hostbridge+0x264/0x269
Dec 29 15:56:10 vdr1 kernel: [ 5558.568917] Code:  Bad EIP value.
Dec 29 15:56:10 vdr1 kernel: [ 5558.568922] EIP: [<2062696c>] 0x2062696c SS:ESP 0068:c842de74
Dec 29 15:56:10 vdr1 kernel: [ 5558.568923] CR2: 000000002062696c
Dec 29 15:56:10 vdr1 kernel: [ 5558.568926] ---[ end trace f5ae98f349325070 ]---

Dec 29 15:58:29 vdr1 kernel: [ 5698.364950] crystalhd 0000:02:00.0: Opening new user[0] handle
Dec 29 15:58:30 vdr1 kernel: [ 5698.557932] crystalhd 0000:02:00.0: Opening new user[0] handle
Dec 29 15:58:30 vdr1 kernel: [ 5698.846312] crystalhd 0000:02:00.0: Close the handle first..
Dec 29 15:58:30 vdr1 kernel: [ 5698.858268] crystalhd 0000:02:00.0: Closing user[0] handle via ioctl with mode 1417200
Dec 29 15:58:30 vdr1 kernel: [ 5698.961171] crystalhd_hw_stats: Invalid Arguments
Dec 29 15:58:30 vdr1 kernel: [ 5698.961204] BUG: unable to handle kernel NULL pointer dereference at 00000040
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] IP: [<c11848d8>] do_raw_spin_trylock+0x8/0x50
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] *pdpt = 0000000030a1d001 *pde = 0000000000000000
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Oops: 0000 [#5] PREEMPT
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core snd_seq_midi_even
t tveeprom videobuf_dma_sg
Dec 29 15:58:30 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Pid: 11927, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP: 0060:[<c11848d8>] EFLAGS: 00210046 CPU: 0
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP is at do_raw_spin_trylock+0x8/0x50
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EAX: 00000040 EBX: 00000000 ECX: 00000040 EDX: 00000000
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] ESI: 00000040 EDI: 00200292 EBP: c85a7e5c ESP: c85a7e58
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] CR0: 8005003b CR2: 00000040 CR3: 34276000 CR4: 000007f0
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] DR6: ffff0ff0 DR7: 00000400
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Process mplayer (pid: 11927, ti=c85a6000 task=f48ce720 task.ti=c85a6000)
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Stack:
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  00000050 c85a7e80 c136c9b5 00000000 00000002 00000000 fa184bd6 f5955c00
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  f5920988 00000000 c85a7ed8 fa184bd6 00000218 c85a6000 00000000 c85a7eb0
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  c117e811 09ce6618 0c955c00 f5955c00 00000000 09ce6618 c85a7ed8 fa1823b9
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Call Trace:
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c136c9b5>] _raw_spin_lock_irqsave+0x55/0x90
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa184bd6>] ? bc_cproc_get_stats+0x226/0x280 [crystalhd]
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa184bd6>] bc_cproc_get_stats+0x226/0x280 [crystalhd]
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c117e811>] ? _copy_from_user+0x41/0xb0
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1823b9>] ? chd_dec_proc_user_data+0x59/0x320 [crystalhd]
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1849b0>] ? bc_cproc_reset_stats+0x20/0x20 [crystalhd]
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c104e73e>] ? hrtimer_nanosleep+0x6e/0xf0
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4ab8>] ? fget_light+0xe8/0x120
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4ad1>] ? fget_light+0x101/0x120
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4a30>] ? fget_light+0x60/0x120
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10f43cd>] sys_ioctl+0x2d/0x60
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c137238c>] sysenter_do_call+0x12/0x32
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Code: a2 66 90 c7 43 08 00 00 00 00 8b 75 f8 8b 7d fc a1 2c dc 4e c1 89 43 0c 8b 5d f4 89 ec 5d c3 8d 74 26 00 55 89 c1 89 e5 53 31 db <8b> 00 c7 01 00 00 00 00 84 c0 0f 9f c3 85 db 74 17 a1 2c dc 4e
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP: [<c11848d8>] do_raw_spin_trylock+0x8/0x50 SS:ESP 0068:c85a7e58
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] CR2: 0000000000000040
Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] ---[ end trace f5ae98f349325071 ]---
Dec 29 15:58:30 vdr1 kernel: [ 5699.232992] note: mplayer[11927] exited with preempt_count 1
Dec 29 15:58:30 vdr1 kernel: [ 5699.251706] crystalhd 0000:02:00.0: Opening new user[0] handle
Dec 29 15:58:31 vdr1 kernel: [ 5699.281871] BUG: unable to handle kernel paging request at 6e757474
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] IP: [<6e757474>] 0x6e757473
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] *pdpt = 000000002fb8b001 *pde = 0000000000000000
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Oops: 0010 [#6] PREEMPT
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core snd_seq_midi_even
t tveeprom videobuf_dma_sg
Dec 29 15:58:31 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Pid: 11926, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: 0060:[<6e757474>] EFLAGS: 00210206 CPU: 0
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP is at 0x6e757474
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EAX: 726f6863 EBX: c538c000 ECX: 00000000 EDX: 00001c08
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] ESI: 000251ac EDI: fb55c1a8 EBP: c8497ea8 ESP: c8497e74
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR0: 8005003b CR2: 6e757474 CR3: 34276000 CR4: 000007f0
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR6: ffff0ff0 DR7: 00000400
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Process mplayer (pid: 11926, ti=c8496000 task=f48c8000 task.ti=c8496000)
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Stack:
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa18a556 ffffffbe c117e3f6 00000060 00210246 002a8464 f7138064 fb537000
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  002a8440 c117e811 f5920988 fb537000 c538c000 c8497ed8 fa18564d c8497ed8
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa182597 f595a000 f595a22c c8497ed8 fa182977 002a8464 f5920900 f595a000
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Call Trace:
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18a556>] ? crystalhd_link_download_fw+0x176/0x300 [crystalhd]
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e3f6>] ? __copy_from_user_ll+0xd6/0xf0
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e811>] ? _copy_from_user+0x41/0xb0
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18564d>] bc_cproc_download_fw+0xed/0x150 [crystalhd]
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182597>] ? chd_dec_proc_user_data+0x237/0x320 [crystalhd]
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa185560>] ? bc_proc_in_completion+0x70/0x70 [crystalhd]
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c136c865>] ? _raw_spin_lock+0x65/0x70
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c109c156>] ? handle_fasteoi_irq+0xb6/0xd0
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ab8>] ? fget_light+0xe8/0x120
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ad1>] ? fget_light+0x101/0x120
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4a30>] ? fget_light+0x60/0x120
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f43cd>] sys_ioctl+0x2d/0x60
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c137238c>] sysenter_do_call+0x12/0x32
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Code:  Bad EIP value.
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: [<6e757474>] 0x6e757474 SS:ESP 0068:c8497e74
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR2: 000000006e757474
Dec 29 15:58:31 vdr1 kernel: [ 5699.538480] ---[ end trace f5ae98f349325072 ]---
Dec 29 15:58:33 vdr1 kernel: [ 5701.629049] crystalhd 0000:02:00.0: F/w Signature mismatch
Dec 29 15:58:33 vdr1 kernel: [ 5701.629065] crystalhd 0000:02:00.0: Firmware Download Failure!! - 21
Dec 29 15:58:33 vdr1 kernel: [ 5701.754795] crystalhd 0000:02:00.0: Closing user[0] handle via ioctl with mode 1417200

Dec 29 15:58:31 vdr1 kernel: [ 5699.281871] BUG: unable to handle kernel paging request at 6e757474
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] IP: [<6e757474>] 0x6e757473
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] *pdpt = 000000002fb8b001 *pde = 0000000000000000
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Oops: 0010 [#6] PREEMPT
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core snd_seq_midi_even
t tveeprom videobuf_dma_sg
Dec 29 15:58:31 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Pid: 11926, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: 0060:[<6e757474>] EFLAGS: 00210206 CPU: 0
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP is at 0x6e757474
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EAX: 726f6863 EBX: c538c000 ECX: 00000000 EDX: 00001c08
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] ESI: 000251ac EDI: fb55c1a8 EBP: c8497ea8 ESP: c8497e74
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR0: 8005003b CR2: 6e757474 CR3: 34276000 CR4: 000007f0
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR6: ffff0ff0 DR7: 00000400
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Process mplayer (pid: 11926, ti=c8496000 task=f48c8000 task.ti=c8496000)
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Stack:
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa18a556 ffffffbe c117e3f6 00000060 00210246 002a8464 f7138064 fb537000
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  002a8440 c117e811 f5920988 fb537000 c538c000 c8497ed8 fa18564d c8497ed8
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa182597 f595a000 f595a22c c8497ed8 fa182977 002a8464 f5920900 f595a000
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Call Trace:
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18a556>] ? crystalhd_link_download_fw+0x176/0x300 [crystalhd]
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e3f6>] ? __copy_from_user_ll+0xd6/0xf0
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e811>] ? _copy_from_user+0x41/0xb0
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18564d>] bc_cproc_download_fw+0xed/0x150 [crystalhd]
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182597>] ? chd_dec_proc_user_data+0x237/0x320 [crystalhd]
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa185560>] ? bc_proc_in_completion+0x70/0x70 [crystalhd]
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c136c865>] ? _raw_spin_lock+0x65/0x70
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c109c156>] ? handle_fasteoi_irq+0xb6/0xd0
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ab8>] ? fget_light+0xe8/0x120
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ad1>] ? fget_light+0x101/0x120
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4a30>] ? fget_light+0x60/0x120
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f43cd>] sys_ioctl+0x2d/0x60
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c137238c>] sysenter_do_call+0x12/0x32
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Code:  Bad EIP value.
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: [<6e757474>] 0x6e757474 SS:ESP 0068:c8497e74
Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR2: 000000006e757474
Dec 29 15:58:31 vdr1 kernel: [ 5699.538480] ---[ end trace f5ae98f349325072 ]---
Dec 29 15:58:33 vdr1 kernel: [ 5701.629049] crystalhd 0000:02:00.0: F/w Signature mismatch
Dec 29 15:58:33 vdr1 kernel: [ 5701.629065] crystalhd 0000:02:00.0: Firmware Download Failure!! - 21
Dec 29 15:58:33 vdr1 kernel: [ 5701.754795] crystalhd 0000:02:00.0: Closing user[0] handle via ioctl with mode 1417200


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [BUG] crystalhd git.linuxtv.org kernel driver: unable to handle kernel paging requests, improper (spin)locking(?) and paging
  2013-01-02  7:48 [BUG] crystalhd git.linuxtv.org kernel driver: unable to handle kernel paging requests, improper (spin)locking(?) and paging thomas schorpp
@ 2013-01-03 15:17 ` Oliver Schinagl
  2013-01-05 12:21   ` [BUG] crystalhd git.linuxtv.org kernel driver: unable to handle kernel paging requests, improper (spin)locking(?) and paging, null pointer oopses on SMP, libcrstalhd3-git i686 not interfacing to amd64 SMP 3.x kernel thomas schorpp
  2013-01-05 12:44   ` thomas schorpp
  0 siblings, 2 replies; 11+ messages in thread
From: Oliver Schinagl @ 2013-01-03 15:17 UTC (permalink / raw)
  To: thomas.schorpp; +Cc: linux-media, j, jarod

I actually am one of the few that has one of those decoders so should be 
able to test things when needed. Just let me know what to test and I 
will try to comply

On 02-01-13 08:48, thomas schorpp wrote:
> Hello guys,
>
> I'm working on supporting BCM 970012/15 crystalhd decoder in userspace 
> video/tv apps and
>
> can't find where to report bugs of
>
> http://git.linuxtv.org/jarod/crystalhd.git
> <devinheitmueller> I think he just borrowed our git server.
>
> So I borrow this list to get more developers, testers and sw- quality 
> guys in.
>
> Forgot to mention the attached Oopses under high load and 
> "multithreading" in half automated stress/mass testing.
>
> Scenario e.g.:
> Dec 29 15:58:29 vdr1 kernel: [ 5698.364950] crystalhd 0000:02:00.0: 
> Opening new user[0] handle
> Dec 29 15:58:30 vdr1 kernel: [ 5698.557932] crystalhd 0000:02:00.0: 
> Opening new user[0] handle
> Dec 29 15:58:30 vdr1 kernel: [ 5698.846312] crystalhd 0000:02:00.0: 
> Close the handle first..
>
> Looks like the driver is not "threadsave", rebuilding kernel with 
> spinlock debugging, should show more up.
>
> y
> tom
>
> -Att: Kernel OOPS bt, etc
>
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568671] BUG: unable to handle 
> kernel paging request at 2062696c
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568678] IP: [<2062696c>] 0x2062696b
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568681] *pdpt = 0000000008497001 
> *pde = 0000000000000000
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568684] Oops: 0010 [#4] PREEMPT
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568731] Modules linked in: md5 
> crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace 
> cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd 
> exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 
> nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 
> nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables 
> af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr 
> aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher 
> crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb 
> snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 
> snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm 
> videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 
> videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core 
> snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci 
> crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core 
> snd_seq_midi_eve
> n
> t tveeprom videobuf_dma_sg
> Dec 29 15:56:10 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core 
> videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core 
> pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore 
> serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg 
> sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata 
> ehci_hcd scsi_mod usbcore
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568770] Pid: 11841, comm: mplayer 
> Tainted: G      D    O 3.6.10-PM #8    /Alviso
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568772] EIP: 0060:[<2062696c>] 
> EFLAGS: 00010286 CPU: 0
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568775] EIP is at 0x2062696c
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568777] EAX: 00370042 EBX: 
> c843c000 ECX: 636e3800 EDX: 00001c10
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568778] ESI: 000238fc EDI: 
> fb0068fc EBP: c842dea8 ESP: c842de74
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568780]  DS: 007b ES: 007b FS: 
> 0000 GS: 0033 SS: 0068
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568781] CR0: 8005003b CR2: 
> 2062696c CR3: 084d9000 CR4: 000007f0
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568783] DR0: 00000000 DR1: 
> 00000000 DR2: 00000000 DR3: 00000000
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568784] DR6: ffff0ff0 DR7: 00000400
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568786] Process mplayer (pid: 
> 11841, ti=c842c000 task=f0aba940 task.ti=c842c000)
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568787] Stack:
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568793]  fa18a569 ffffff10 
> c117e3f6 00000060 00010246 002a8464 f7138064 fafe3000
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568798]  002a8440 c117e811 
> f5920988 fafe3000 c843c000 c842ded8 fa18564d c842ded8
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568803]  fa182597 f595a400 
> f595a62c c842ded8 fa182977 002a8464 f5920900 f595a400
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568804] Call Trace:
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568818]  [<fa18a569>] ? 
> crystalhd_link_download_fw+0x189/0x300 [crystalhd]
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568823]  [<c117e3f6>] ? 
> __copy_from_user_ll+0xd6/0xf0
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568828]  [<c117e811>] ? 
> _copy_from_user+0x41/0xb0
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568839]  [<fa18564d>] 
> bc_cproc_download_fw+0xed/0x150 [crystalhd]
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568846]  [<fa182597>] ? 
> chd_dec_proc_user_data+0x237/0x320 [crystalhd]
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568854]  [<fa182977>] ? 
> chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568861]  [<fa182b5e>] 
> chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568870]  [<fa185560>] ? 
> bc_proc_in_completion+0x70/0x70 [crystalhd]
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568877]  [<fa1829f0>] ? 
> chd_dec_free_iodata+0x50/0x50 [crystalhd]
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568881]  [<c10f4355>] 
> do_vfs_ioctl+0x535/0x580
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568886]  [<c10685ef>] ? 
> ktime_get+0x6f/0xf0
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568891]  [<c101ca56>] ? 
> lapic_next_event+0x16/0x20
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568895]  [<c106f287>] ? 
> clockevents_program_event+0xe7/0x130
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568898]  [<c10e4ab8>] ? 
> fget_light+0xe8/0x120
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568901]  [<c10e4ad1>] ? 
> fget_light+0x101/0x120
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568904]  [<c10e4a30>] ? 
> fget_light+0x60/0x120
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568906]  [<c10f43cd>] 
> sys_ioctl+0x2d/0x60
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568910]  [<c137238c>] 
> sysenter_do_call+0x12/0x32
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568914]  [<c1360000>] ? 
> asus_hides_smbus_hostbridge+0x264/0x269
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568917] Code:  Bad EIP value.
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568922] EIP: [<2062696c>] 
> 0x2062696c SS:ESP 0068:c842de74
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568923] CR2: 000000002062696c
> Dec 29 15:56:10 vdr1 kernel: [ 5558.568926] ---[ end trace 
> f5ae98f349325070 ]---
>
> Dec 29 15:58:29 vdr1 kernel: [ 5698.364950] crystalhd 0000:02:00.0: 
> Opening new user[0] handle
> Dec 29 15:58:30 vdr1 kernel: [ 5698.557932] crystalhd 0000:02:00.0: 
> Opening new user[0] handle
> Dec 29 15:58:30 vdr1 kernel: [ 5698.846312] crystalhd 0000:02:00.0: 
> Close the handle first..
> Dec 29 15:58:30 vdr1 kernel: [ 5698.858268] crystalhd 0000:02:00.0: 
> Closing user[0] handle via ioctl with mode 1417200
> Dec 29 15:58:30 vdr1 kernel: [ 5698.961171] crystalhd_hw_stats: 
> Invalid Arguments
> Dec 29 15:58:30 vdr1 kernel: [ 5698.961204] BUG: unable to handle 
> kernel NULL pointer dereference at 00000040
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] IP: [<c11848d8>] 
> do_raw_spin_trylock+0x8/0x50
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] *pdpt = 0000000030a1d001 
> *pde = 0000000000000000
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Oops: 0000 [#5] PREEMPT
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Modules linked in: md5 
> crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace 
> cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd 
> exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 
> nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 
> nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables 
> af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr 
> aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher 
> crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb 
> snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 
> snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm 
> videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 
> videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core 
> snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci 
> crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core 
> snd_seq_midi_eve
> n
> t tveeprom videobuf_dma_sg
> Dec 29 15:58:30 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core 
> videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core 
> pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore 
> serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg 
> sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata 
> ehci_hcd scsi_mod usbcore
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Pid: 11927, comm: mplayer 
> Tainted: G      D    O 3.6.10-PM #8    /Alviso
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP: 0060:[<c11848d8>] 
> EFLAGS: 00210046 CPU: 0
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP is at 
> do_raw_spin_trylock+0x8/0x50
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EAX: 00000040 EBX: 
> 00000000 ECX: 00000040 EDX: 00000000
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] ESI: 00000040 EDI: 
> 00200292 EBP: c85a7e5c ESP: c85a7e58
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  DS: 007b ES: 007b FS: 
> 0000 GS: 0033 SS: 0068
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] CR0: 8005003b CR2: 
> 00000040 CR3: 34276000 CR4: 000007f0
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] DR0: 00000000 DR1: 
> 00000000 DR2: 00000000 DR3: 00000000
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] DR6: ffff0ff0 DR7: 00000400
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Process mplayer (pid: 
> 11927, ti=c85a6000 task=f48ce720 task.ti=c85a6000)
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Stack:
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  00000050 c85a7e80 
> c136c9b5 00000000 00000002 00000000 fa184bd6 f5955c00
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  f5920988 00000000 
> c85a7ed8 fa184bd6 00000218 c85a6000 00000000 c85a7eb0
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  c117e811 09ce6618 
> 0c955c00 f5955c00 00000000 09ce6618 c85a7ed8 fa1823b9
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Call Trace:
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c136c9b5>] 
> _raw_spin_lock_irqsave+0x55/0x90
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa184bd6>] ? 
> bc_cproc_get_stats+0x226/0x280 [crystalhd]
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa184bd6>] 
> bc_cproc_get_stats+0x226/0x280 [crystalhd]
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c117e811>] ? 
> _copy_from_user+0x41/0xb0
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1823b9>] ? 
> chd_dec_proc_user_data+0x59/0x320 [crystalhd]
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa182977>] ? 
> chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa182b5e>] 
> chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1849b0>] ? 
> bc_cproc_reset_stats+0x20/0x20 [crystalhd]
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1829f0>] ? 
> chd_dec_free_iodata+0x50/0x50 [crystalhd]
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10f4355>] 
> do_vfs_ioctl+0x535/0x580
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c104e73e>] ? 
> hrtimer_nanosleep+0x6e/0xf0
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4ab8>] ? 
> fget_light+0xe8/0x120
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4ad1>] ? 
> fget_light+0x101/0x120
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4a30>] ? 
> fget_light+0x60/0x120
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10f43cd>] 
> sys_ioctl+0x2d/0x60
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c137238c>] 
> sysenter_do_call+0x12/0x32
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Code: a2 66 90 c7 43 08 00 
> 00 00 00 8b 75 f8 8b 7d fc a1 2c dc 4e c1 89 43 0c 8b 5d f4 89 ec 5d 
> c3 8d 74 26 00 55 89 c1 89 e5 53 31 db <8b> 00 c7 01 00 00 00 00 84 c0 
> 0f 9f c3 85 db 74 17 a1 2c dc 4e
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP: [<c11848d8>] 
> do_raw_spin_trylock+0x8/0x50 SS:ESP 0068:c85a7e58
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] CR2: 0000000000000040
> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] ---[ end trace 
> f5ae98f349325071 ]---
> Dec 29 15:58:30 vdr1 kernel: [ 5699.232992] note: mplayer[11927] 
> exited with preempt_count 1
> Dec 29 15:58:30 vdr1 kernel: [ 5699.251706] crystalhd 0000:02:00.0: 
> Opening new user[0] handle
> Dec 29 15:58:31 vdr1 kernel: [ 5699.281871] BUG: unable to handle 
> kernel paging request at 6e757474
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] IP: [<6e757474>] 0x6e757473
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] *pdpt = 000000002fb8b001 
> *pde = 0000000000000000
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Oops: 0010 [#6] PREEMPT
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Modules linked in: md5 
> crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace 
> cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd 
> exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 
> nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 
> nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables 
> af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr 
> aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher 
> crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb 
> snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 
> snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm 
> videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 
> videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core 
> snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci 
> crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core 
> snd_seq_midi_eve
> n
> t tveeprom videobuf_dma_sg
> Dec 29 15:58:31 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core 
> videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core 
> pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore 
> serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg 
> sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata 
> ehci_hcd scsi_mod usbcore
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Pid: 11926, comm: mplayer 
> Tainted: G      D    O 3.6.10-PM #8    /Alviso
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: 0060:[<6e757474>] 
> EFLAGS: 00210206 CPU: 0
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP is at 0x6e757474
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EAX: 726f6863 EBX: 
> c538c000 ECX: 00000000 EDX: 00001c08
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] ESI: 000251ac EDI: 
> fb55c1a8 EBP: c8497ea8 ESP: c8497e74
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  DS: 007b ES: 007b FS: 
> 0000 GS: 0033 SS: 0068
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR0: 8005003b CR2: 
> 6e757474 CR3: 34276000 CR4: 000007f0
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR0: 00000000 DR1: 
> 00000000 DR2: 00000000 DR3: 00000000
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR6: ffff0ff0 DR7: 00000400
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Process mplayer (pid: 
> 11926, ti=c8496000 task=f48c8000 task.ti=c8496000)
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Stack:
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa18a556 ffffffbe 
> c117e3f6 00000060 00210246 002a8464 f7138064 fb537000
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  002a8440 c117e811 
> f5920988 fb537000 c538c000 c8497ed8 fa18564d c8497ed8
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa182597 f595a000 
> f595a22c c8497ed8 fa182977 002a8464 f5920900 f595a000
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Call Trace:
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18a556>] ? 
> crystalhd_link_download_fw+0x176/0x300 [crystalhd]
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e3f6>] ? 
> __copy_from_user_ll+0xd6/0xf0
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e811>] ? 
> _copy_from_user+0x41/0xb0
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18564d>] 
> bc_cproc_download_fw+0xed/0x150 [crystalhd]
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182597>] ? 
> chd_dec_proc_user_data+0x237/0x320 [crystalhd]
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182977>] ? 
> chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182b5e>] 
> chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa185560>] ? 
> bc_proc_in_completion+0x70/0x70 [crystalhd]
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa1829f0>] ? 
> chd_dec_free_iodata+0x50/0x50 [crystalhd]
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f4355>] 
> do_vfs_ioctl+0x535/0x580
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c136c865>] ? 
> _raw_spin_lock+0x65/0x70
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c109c156>] ? 
> handle_fasteoi_irq+0xb6/0xd0
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ab8>] ? 
> fget_light+0xe8/0x120
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ad1>] ? 
> fget_light+0x101/0x120
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4a30>] ? 
> fget_light+0x60/0x120
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f43cd>] 
> sys_ioctl+0x2d/0x60
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c137238c>] 
> sysenter_do_call+0x12/0x32
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Code:  Bad EIP value.
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: [<6e757474>] 
> 0x6e757474 SS:ESP 0068:c8497e74
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR2: 000000006e757474
> Dec 29 15:58:31 vdr1 kernel: [ 5699.538480] ---[ end trace 
> f5ae98f349325072 ]---
> Dec 29 15:58:33 vdr1 kernel: [ 5701.629049] crystalhd 0000:02:00.0: 
> F/w Signature mismatch
> Dec 29 15:58:33 vdr1 kernel: [ 5701.629065] crystalhd 0000:02:00.0: 
> Firmware Download Failure!! - 21
> Dec 29 15:58:33 vdr1 kernel: [ 5701.754795] crystalhd 0000:02:00.0: 
> Closing user[0] handle via ioctl with mode 1417200
>
> Dec 29 15:58:31 vdr1 kernel: [ 5699.281871] BUG: unable to handle 
> kernel paging request at 6e757474
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] IP: [<6e757474>] 0x6e757473
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] *pdpt = 000000002fb8b001 
> *pde = 0000000000000000
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Oops: 0010 [#6] PREEMPT
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Modules linked in: md5 
> crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace 
> cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd 
> exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 
> nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 
> nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables 
> af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr 
> aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher 
> crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb 
> snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 
> snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm 
> videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 
> videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core 
> snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci 
> crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core 
> snd_seq_midi_eve
> n
> t tveeprom videobuf_dma_sg
> Dec 29 15:58:31 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core 
> videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core 
> pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore 
> serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg 
> sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata 
> ehci_hcd scsi_mod usbcore
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Pid: 11926, comm: mplayer 
> Tainted: G      D    O 3.6.10-PM #8    /Alviso
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: 0060:[<6e757474>] 
> EFLAGS: 00210206 CPU: 0
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP is at 0x6e757474
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EAX: 726f6863 EBX: 
> c538c000 ECX: 00000000 EDX: 00001c08
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] ESI: 000251ac EDI: 
> fb55c1a8 EBP: c8497ea8 ESP: c8497e74
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  DS: 007b ES: 007b FS: 
> 0000 GS: 0033 SS: 0068
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR0: 8005003b CR2: 
> 6e757474 CR3: 34276000 CR4: 000007f0
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR0: 00000000 DR1: 
> 00000000 DR2: 00000000 DR3: 00000000
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR6: ffff0ff0 DR7: 00000400
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Process mplayer (pid: 
> 11926, ti=c8496000 task=f48c8000 task.ti=c8496000)
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Stack:
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa18a556 ffffffbe 
> c117e3f6 00000060 00210246 002a8464 f7138064 fb537000
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  002a8440 c117e811 
> f5920988 fb537000 c538c000 c8497ed8 fa18564d c8497ed8
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa182597 f595a000 
> f595a22c c8497ed8 fa182977 002a8464 f5920900 f595a000
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Call Trace:
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18a556>] ? 
> crystalhd_link_download_fw+0x176/0x300 [crystalhd]
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e3f6>] ? 
> __copy_from_user_ll+0xd6/0xf0
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e811>] ? 
> _copy_from_user+0x41/0xb0
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18564d>] 
> bc_cproc_download_fw+0xed/0x150 [crystalhd]
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182597>] ? 
> chd_dec_proc_user_data+0x237/0x320 [crystalhd]
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182977>] ? 
> chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182b5e>] 
> chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa185560>] ? 
> bc_proc_in_completion+0x70/0x70 [crystalhd]
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa1829f0>] ? 
> chd_dec_free_iodata+0x50/0x50 [crystalhd]
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f4355>] 
> do_vfs_ioctl+0x535/0x580
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c136c865>] ? 
> _raw_spin_lock+0x65/0x70
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c109c156>] ? 
> handle_fasteoi_irq+0xb6/0xd0
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ab8>] ? 
> fget_light+0xe8/0x120
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ad1>] ? 
> fget_light+0x101/0x120
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4a30>] ? 
> fget_light+0x60/0x120
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f43cd>] 
> sys_ioctl+0x2d/0x60
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c137238c>] 
> sysenter_do_call+0x12/0x32
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Code:  Bad EIP value.
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: [<6e757474>] 
> 0x6e757474 SS:ESP 0068:c8497e74
> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR2: 000000006e757474
> Dec 29 15:58:31 vdr1 kernel: [ 5699.538480] ---[ end trace 
> f5ae98f349325072 ]---
> Dec 29 15:58:33 vdr1 kernel: [ 5701.629049] crystalhd 0000:02:00.0: 
> F/w Signature mismatch
> Dec 29 15:58:33 vdr1 kernel: [ 5701.629065] crystalhd 0000:02:00.0: 
> Firmware Download Failure!! - 21
> Dec 29 15:58:33 vdr1 kernel: [ 5701.754795] crystalhd 0000:02:00.0: 
> Closing user[0] handle via ioctl with mode 1417200
>
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [BUG] crystalhd git.linuxtv.org kernel driver: unable to handle kernel paging requests, improper (spin)locking(?) and paging, null pointer oopses on SMP, libcrstalhd3-git i686 not interfacing to amd64 SMP 3.x kernel
  2013-01-03 15:17 ` Oliver Schinagl
@ 2013-01-05 12:21   ` thomas schorpp
  2013-01-05 12:44   ` thomas schorpp
  1 sibling, 0 replies; 11+ messages in thread
From: thomas schorpp @ 2013-01-05 12:21 UTC (permalink / raw)
  To: Oliver Schinagl; +Cc: linux-media, j, jarod, prasadb, nsankar

Hi Oliver,  hi crystalhd users and devs,  hello Broadcom Crystal HD staff,

1.
sorry for the delay, I had to upgrade my old debian i386 stable...squeeze-backports userspace on the old core2duo machine to amd64 by full reinstall, otherwise the driver interface of libcrystalhd3 i686 to 3.6.10...3.7.1amd64 SMP kernel.org kernels has failed permanently,

please (anyone still running such a setup or You) try to confirm this and report to this thread.

lspci still shows the same PCI-E errors (see my other posts to this list) with the working libcrystalhd3 amd64 and broadcom designed crystalhd driver now, so
this data reported from the chipset or lspci has to be considered faulty or stale and irelevant now, I will build the latest lspci from source to crosscheck this.


Please build ffmpeg rel. 1.0.1(non-MT version, not later version, git master showed up with an audio format bug, presenting wrong audio sample format as planar (sfltp, fltp, s16p) which bino cannot handle and makes mplayer cry for not having libavresample access but which is disabled by default in ffmpeg configure defaults and debian dmo source packages )
from Your distro source package with --disable-decoders='h264, h264_vdpau, h264_vda' and leave only h264_crystalhd need as h.264 decoder

and so trigger crystalhd by every app on your system accessing h.264 content for parsing or decoding and linked to libavcodec (check binaries with ldd if linked against this libavcodec54, , in libavcodec53 h264_crystalhd is flagged CAP_EXPERIMENTAL, which makes it unaccesible by other apps than the ffmpeg program (-strict -2), mplayer: -vc ffh264crystalhd, or will fail --disable-decoders='h264, h264_vdpau, h264_vda')  like mplayer (not statically linked), kaffeine, vlc, gnome nautilus media file properties (uses mplayer -identify) sequentially called and then in parallel and record and post the Ooopses in this thread here until the authors return from winter sports ;-)
Note for Bino users: System requirement is at least debian squeeze-backports X and DRI, otherwise bino will segfault the dri driver, i965 here and you need to build libGLEW(mx) 1.6 from source for debian stable systems, see http://savannah.nongnu.org/bugs/?33368 http://bino3d.org/help-wanted.html

2.
With the new amd64 userspace on 3.7.1 SMP PREEMPT kernel things got even more worse here now, got 5 kernel panics in IRQ handler of the crystalhd driver in 1h while watching h.264 with
mplayer2/1 (single threaded decoding mode, stereo3d filter) resulting in system halting kernel crashes, I need to setup serial console debugging to get the logs, on my Pentium M i686 vdr machine, kernel has been able to continue at least after the null pointer oopses.
We need to have confirmation for this, too.

3.
Since the source code still states broadcom staff as module authors and the download on the broadcom website is packaged broken tar.bz2 and does not build here with recent kernels,
I'm CC'ing them now, too, and because it's their basic driver skeleton design and the quality and performance of this driver is far below the windows driver, which performs h.264 1080 great with http://mpc-hc.sourceforge.net at 5-10% cpu usage even on xp x64 on a i965, this should be the reference development target.

4.
The driver Makefile won't compile it with debian squeeze-backports 3.2 and 3.2 bpo kbuild infrastructure, missing helper scripts and includes, it needs a full ready build kernel from sources:

schorpp@tom3:/usr/local/src/crystalhd/driver/linux$ LC_ALL=C make
make -C /lib/modules/3.2.0-0.bpo.4-amd64/build SUBDIRS=/mnt/data/usr/local/src/crystalhd/driver/linux modules
make[1]: Entering directory `/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-amd64'
/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/Makefile:287: /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/scripts/Kbuild.include: Datei oder Verzeichnis nicht gefunden
/bin/bash: /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/scripts/gcc-x86_64-has-stack-protector.sh: Datei oder Verzeichnis nicht gefunden
/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/arch/x86/Makefile:81: stack protector enabled but no compiler support
/bin/bash: /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/scripts/gcc-goto.sh: Datei oder Verzeichnis nicht gefunden
make: *** Leerer Variablenname.  Schluss.
make[3]: *** [_module_/mnt/data/usr/local/src/crystalhd/driver/linux] Fehler 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-amd64'
make: *** [all] Error 2
schorpp@tom3:/usr/local/src/crystalhd/driver/linux$

5.
I'm focusing to the 3.x kernel source code delivered staging driver now (only BCM70012 support so far, no BCM70015) meanwhile unitil we get more information.

6.
Mythtv and xbmc people please join and report, too.

You can get a BCM70012 for just 10US$, a BCM700015 from 30US$ up on Ebay from china, mini-PCI-E to PCI-E adapter cards for not much more, I think it's worth playing ;-)

y
tom

Att: Oopscrash in IRQ- handler:

Jan  4 20:43:38 tom3 kernel: [  779.388263] crystalhd 0000:03:00.0: list_index:1 rx[23] rxtot[2031] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
Jan  4 20:43:38 tom3 kernel: [  779.435169] crystalhd 0000:03:00.0: list_index:1 rx[24] rxtot[2033] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
Jan  4 20:43:38 tom3 kernel: [  779.479479] crystalhd 0000:03:00.0: list_index:1 rx[25] rxtot[2035] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
Jan  4 20:43:38 tom3 kernel: [  779.569384] crystalhd 0000:03:00.0: MISSING 2 PICTURES
Jan  4 20:43:38 tom3 kernel: [  779.614878] crystalhd 0000:03:00.0: MISSING 3 PICTURES
Jan  4 20:43:38 tom3 kernel: [  779.662146] crystalhd 0000:03:00.0: MISSING 2 PICTURES
Jan  4 20:43:38 tom3 kernel: [  779.828924] crystalhd 0000:03:00.0: list_index:1 rx[26] rxtot[2057] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
Jan  4 20:43:38 tom3 kernel: [  779.890531] BUG: unable to handle kernel NULL pointer dereference at 000000000000002c
Jan  4 20:43:38 tom3 kernel: [  779.890668] IP: [<ffffffffa03ce0a0>] crystalhd_dioq_fetch_wait+0x210/0x3e0 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.890800] PGD 1573f067 PUD 4a2bf067 PMD 0
Jan  4 20:43:38 tom3 kernel: [  779.890888] Oops: 0000 [#1] PREEMPT SMP
Jan  4 20:43:38 tom3 kernel: [  779.890974] Modules linked in: nfsv4 nfs fscache uinput parport_pc ppdev lp parport bridge stp llc bnep rfcomm bluetooth nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs cpufreq_powersave cpufreq_stats cpufreq_conservative cpufreq_performance cpufreq_ondemand fuse dm_mod ext3 jbd pciehp arc4 ath5k ath mac80211 snd_hda_codec_analog cfg80211 snd_hda_intel snd_usb_audio snd_hda_codec snd_hwdep snd_pcm_oss thinkpad_acpi snd_mixer_oss rfkill snd_usbmidi_lib snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer pcmcia snd_seq_device psmouse snd yenta_socket tpm_tis pcmcia_rsrc acpi_cpufreq tpm pcmcia_core crystalhd(O) coretemp pcspkr soundcore i2c_i801 serio_raw led_class snd_page_alloc freq_table tpm_bios battery ac nvram rtc_cmos hid_generic wmi mperf evdev processor nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit xt_tcpudp iptable_filter ip_t
ables x_tables usb_storage
Jan  4 20:43:38 tom3 kernel: ext4 mbcache jbd2 crc16 usbhid hid sg sd_mod crc_t10dif ata_generic uhci_hcd ahci libahci ata_piix atkbd libata xhci_hcd thermal ehci_hcd usbcore e1000e usb_common
Jan  4 20:43:38 tom3 kernel: [  779.891477] CPU 0
Jan  4 20:43:38 tom3 kernel: [  779.891477] Pid: 6837, comm: mplayer2 Tainted: G           O 3.7.1 #10 LENOVO 7735Y1T/7735Y1T
Jan  4 20:43:38 tom3 kernel: [  779.891477] RIP: 0010:[<ffffffffa03ce0a0>]  [<ffffffffa03ce0a0>] crystalhd_dioq_fetch_wait+0x210/0x3e0 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477] RSP: 0018:ffff88004a387d28  EFLAGS: 00010246
Jan  4 20:43:38 tom3 kernel: [  779.891477] RAX: 0000000000000000 RBX: ffff88004a32bf00 RCX: 0000000000000000
Jan  4 20:43:38 tom3 kernel: [  779.891477] RDX: 0000000000000046 RSI: ffffffffa03cd57b RDI: ffffffff814d6881
Jan  4 20:43:38 tom3 kernel: [  779.891477] RBP: ffff88004a387dd8 R08: 0000000000000000 R09: 0000000000000001
Jan  4 20:43:38 tom3 kernel: [  779.891477] R10: 0000000000000000 R11: 0000000000000001 R12: ffff880079e490c0
Jan  4 20:43:38 tom3 kernel: [  779.891477] R13: 0000000000000000 R14: ffff880079e490e8 R15: ffff88004a32bf00
Jan  4 20:43:38 tom3 kernel: [  779.891477] FS:  00007fe394b83780(0000) GS:ffff88007f400000(0000) knlGS:0000000000000000
Jan  4 20:43:38 tom3 kernel: [  779.891477] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jan  4 20:43:38 tom3 kernel: [  779.891477] CR2: 000000000000002c CR3: 00000000157f1000 CR4: 00000000000007f0
Jan  4 20:43:38 tom3 kernel: [  779.891477] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Jan  4 20:43:38 tom3 kernel: [  779.891477] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Jan  4 20:43:38 tom3 kernel: [  779.891477] Process mplayer2 (pid: 6837, threadinfo ffff88004a386000, task ffff88004a32bf00)
Jan  4 20:43:38 tom3 kernel: [  779.891477] Stack:
Jan  4 20:43:38 tom3 kernel: [  779.891477]  ffff88004a32c5c0 000003448106c4f6 ffff88007aed2a00 ffff88007c162098
Jan  4 20:43:38 tom3 kernel: [  779.891477]  ffff88004a387df4 ffff8800157529b0 ffff880015752800 ffff88004a32bf00
Jan  4 20:43:38 tom3 kernel: [  779.891477]  ffff880079e49120 0000000100075a56 0000000000000000 ffff88004a32bf00
Jan  4 20:43:38 tom3 kernel: [  779.891477] Call Trace:
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff81079df0>] ? try_to_wake_up+0x230/0x230
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03cf680>] ? bc_cproc_start_capture+0xf0/0xf0 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03d13de>] crystalhd_hw_get_cap_buffer+0x6e/0x180 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03cf73d>] bc_cproc_fetch_frame+0xbd/0x1b0 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03ccdab>] chd_dec_api_cmd+0xab/0x100 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03ccf42>] chd_dec_ioctl+0x142/0x160 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff81181d6a>] do_vfs_ioctl+0x2da/0x310
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff8118d8f0>] ? fget_light+0x70/0x160
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff81181df7>] sys_ioctl+0x57/0x90
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff8123c79e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff814de802>] system_call_fastpath+0x16/0x1b
Jan  4 20:43:38 tom3 kernel: [  779.891477] Code: 87 10 e1 45 85 ed 0f 85 4f 01 00 00 48 8b bd 78 ff ff ff e8 a3 e4 c9 e0 85 c0 0f 85 4e 01 00 00 4c 89 e7 e8 b3 f3 ff ff 49 89 c0 <f6> 40 2c 03 0f 85 97 01 00 00 48 8b 4d 80 48 8b 81 d0 00 00 00
Jan  4 20:43:38 tom3 kernel: [  779.891477] RIP  [<ffffffffa03ce0a0>] crystalhd_dioq_fetch_wait+0x210/0x3e0 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477]  RSP <ffff88004a387d28>
Jan  4 20:43:38 tom3 kernel: [  779.891477] CR2: 000000000000002c
Jan  4 20:43:38 tom3 kernel: [  779.912578] delay: estimated 384, actual 0
Jan  4 20:43:38 tom3 kernel: [  779.912610] delay: estimated 384, actual 48
Jan  4 20:43:38 tom3 kernel: [  779.914258] ---[ end trace b4d3d5bb1ad97fd7 ]---
Jan  4 20:46:05 tom3 kernel: [  926.565061] SysRq : Emergency Remount R/O


On 03.01.2013 16:17, Oliver Schinagl wrote:
> I actually am one of the few that has one of those decoders so should be able to test things when needed. Just let me know what to test and I will try to comply
>
> On 02-01-13 08:48, thomas schorpp wrote:
>> Hello guys,
>>
>> I'm working on supporting BCM 970012/15 crystalhd decoder in userspace video/tv apps and
>>
>> can't find where to report bugs of
>>
>> http://git.linuxtv.org/jarod/crystalhd.git
>> <devinheitmueller> I think he just borrowed our git server.
>>
>> So I borrow this list to get more developers, testers and sw- quality guys in.
>>
>> Forgot to mention the attached Oopses under high load and "multithreading" in half automated stress/mass testing.
>>
>> Scenario e.g.:
>> Dec 29 15:58:29 vdr1 kernel: [ 5698.364950] crystalhd 0000:02:00.0: Opening new user[0] handle
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.557932] crystalhd 0000:02:00.0: Opening new user[0] handle
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.846312] crystalhd 0000:02:00.0: Close the handle first..
>>
>> Looks like the driver is not "threadsave", rebuilding kernel with spinlock debugging, should show more up.
>>
>> y
>> tom
>>
>> -Att: Kernel OOPS bt, etc
>>
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568671] BUG: unable to handle kernel paging request at 2062696c
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568678] IP: [<2062696c>] 0x2062696b
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568681] *pdpt = 0000000008497001 *pde = 0000000000000000
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568684] Oops: 0010 [#4] PREEMPT
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568731] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>> snd_seq_midi_eve
>> n
>> t tveeprom videobuf_dma_sg
>> Dec 29 15:56:10 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568770] Pid: 11841, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568772] EIP: 0060:[<2062696c>] EFLAGS: 00010286 CPU: 0
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568775] EIP is at 0x2062696c
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568777] EAX: 00370042 EBX: c843c000 ECX: 636e3800 EDX: 00001c10
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568778] ESI: 000238fc EDI: fb0068fc EBP: c842dea8 ESP: c842de74
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568780]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568781] CR0: 8005003b CR2: 2062696c CR3: 084d9000 CR4: 000007f0
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568783] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568784] DR6: ffff0ff0 DR7: 00000400
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568786] Process mplayer (pid: 11841, ti=c842c000 task=f0aba940 task.ti=c842c000)
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568787] Stack:
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568793]  fa18a569 ffffff10 c117e3f6 00000060 00010246 002a8464 f7138064 fafe3000
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568798]  002a8440 c117e811 f5920988 fafe3000 c843c000 c842ded8 fa18564d c842ded8
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568803]  fa182597 f595a400 f595a62c c842ded8 fa182977 002a8464 f5920900 f595a400
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568804] Call Trace:
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568818]  [<fa18a569>] ? crystalhd_link_download_fw+0x189/0x300 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568823]  [<c117e3f6>] ? __copy_from_user_ll+0xd6/0xf0
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568828]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568839]  [<fa18564d>] bc_cproc_download_fw+0xed/0x150 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568846]  [<fa182597>] ? chd_dec_proc_user_data+0x237/0x320 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568854]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568861]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568870]  [<fa185560>] ? bc_proc_in_completion+0x70/0x70 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568877]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568881]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568886]  [<c10685ef>] ? ktime_get+0x6f/0xf0
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568891]  [<c101ca56>] ? lapic_next_event+0x16/0x20
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568895]  [<c106f287>] ? clockevents_program_event+0xe7/0x130
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568898]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568901]  [<c10e4ad1>] ? fget_light+0x101/0x120
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568904]  [<c10e4a30>] ? fget_light+0x60/0x120
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568906]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568910]  [<c137238c>] sysenter_do_call+0x12/0x32
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568914]  [<c1360000>] ? asus_hides_smbus_hostbridge+0x264/0x269
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568917] Code:  Bad EIP value.
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568922] EIP: [<2062696c>] 0x2062696c SS:ESP 0068:c842de74
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568923] CR2: 000000002062696c
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568926] ---[ end trace f5ae98f349325070 ]---
>>
>> Dec 29 15:58:29 vdr1 kernel: [ 5698.364950] crystalhd 0000:02:00.0: Opening new user[0] handle
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.557932] crystalhd 0000:02:00.0: Opening new user[0] handle
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.846312] crystalhd 0000:02:00.0: Close the handle first..
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.858268] crystalhd 0000:02:00.0: Closing user[0] handle via ioctl with mode 1417200
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.961171] crystalhd_hw_stats: Invalid Arguments
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.961204] BUG: unable to handle kernel NULL pointer dereference at 00000040
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] IP: [<c11848d8>] do_raw_spin_trylock+0x8/0x50
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] *pdpt = 0000000030a1d001 *pde = 0000000000000000
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Oops: 0000 [#5] PREEMPT
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>> snd_seq_midi_eve
>> n
>> t tveeprom videobuf_dma_sg
>> Dec 29 15:58:30 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Pid: 11927, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP: 0060:[<c11848d8>] EFLAGS: 00210046 CPU: 0
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP is at do_raw_spin_trylock+0x8/0x50
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EAX: 00000040 EBX: 00000000 ECX: 00000040 EDX: 00000000
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] ESI: 00000040 EDI: 00200292 EBP: c85a7e5c ESP: c85a7e58
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] CR0: 8005003b CR2: 00000040 CR3: 34276000 CR4: 000007f0
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] DR6: ffff0ff0 DR7: 00000400
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Process mplayer (pid: 11927, ti=c85a6000 task=f48ce720 task.ti=c85a6000)
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Stack:
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  00000050 c85a7e80 c136c9b5 00000000 00000002 00000000 fa184bd6 f5955c00
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  f5920988 00000000 c85a7ed8 fa184bd6 00000218 c85a6000 00000000 c85a7eb0
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  c117e811 09ce6618 0c955c00 f5955c00 00000000 09ce6618 c85a7ed8 fa1823b9
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Call Trace:
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c136c9b5>] _raw_spin_lock_irqsave+0x55/0x90
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa184bd6>] ? bc_cproc_get_stats+0x226/0x280 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa184bd6>] bc_cproc_get_stats+0x226/0x280 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1823b9>] ? chd_dec_proc_user_data+0x59/0x320 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1849b0>] ? bc_cproc_reset_stats+0x20/0x20 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c104e73e>] ? hrtimer_nanosleep+0x6e/0xf0
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4ad1>] ? fget_light+0x101/0x120
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4a30>] ? fget_light+0x60/0x120
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c137238c>] sysenter_do_call+0x12/0x32
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Code: a2 66 90 c7 43 08 00 00 00 00 8b 75 f8 8b 7d fc a1 2c dc 4e c1 89 43 0c 8b 5d f4 89 ec 5d c3 8d 74 26 00 55 89 c1 89 e5 53 31 db <8b> 00 c7 01 00 00 00 00 84 c0 0f 9f c3 85 db 74 17 a1 2c dc 4e
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP: [<c11848d8>] do_raw_spin_trylock+0x8/0x50 SS:ESP 0068:c85a7e58
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] CR2: 0000000000000040
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] ---[ end trace f5ae98f349325071 ]---
>> Dec 29 15:58:30 vdr1 kernel: [ 5699.232992] note: mplayer[11927] exited with preempt_count 1
>> Dec 29 15:58:30 vdr1 kernel: [ 5699.251706] crystalhd 0000:02:00.0: Opening new user[0] handle
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.281871] BUG: unable to handle kernel paging request at 6e757474
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] IP: [<6e757474>] 0x6e757473
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] *pdpt = 000000002fb8b001 *pde = 0000000000000000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Oops: 0010 [#6] PREEMPT
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>> snd_seq_midi_eve
>> n
>> t tveeprom videobuf_dma_sg
>> Dec 29 15:58:31 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Pid: 11926, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: 0060:[<6e757474>] EFLAGS: 00210206 CPU: 0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP is at 0x6e757474
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EAX: 726f6863 EBX: c538c000 ECX: 00000000 EDX: 00001c08
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] ESI: 000251ac EDI: fb55c1a8 EBP: c8497ea8 ESP: c8497e74
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR0: 8005003b CR2: 6e757474 CR3: 34276000 CR4: 000007f0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR6: ffff0ff0 DR7: 00000400
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Process mplayer (pid: 11926, ti=c8496000 task=f48c8000 task.ti=c8496000)
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Stack:
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa18a556 ffffffbe c117e3f6 00000060 00210246 002a8464 f7138064 fb537000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  002a8440 c117e811 f5920988 fb537000 c538c000 c8497ed8 fa18564d c8497ed8
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa182597 f595a000 f595a22c c8497ed8 fa182977 002a8464 f5920900 f595a000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Call Trace:
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18a556>] ? crystalhd_link_download_fw+0x176/0x300 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e3f6>] ? __copy_from_user_ll+0xd6/0xf0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18564d>] bc_cproc_download_fw+0xed/0x150 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182597>] ? chd_dec_proc_user_data+0x237/0x320 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa185560>] ? bc_proc_in_completion+0x70/0x70 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c136c865>] ? _raw_spin_lock+0x65/0x70
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c109c156>] ? handle_fasteoi_irq+0xb6/0xd0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ad1>] ? fget_light+0x101/0x120
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4a30>] ? fget_light+0x60/0x120
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c137238c>] sysenter_do_call+0x12/0x32
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Code:  Bad EIP value.
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: [<6e757474>] 0x6e757474 SS:ESP 0068:c8497e74
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR2: 000000006e757474
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.538480] ---[ end trace f5ae98f349325072 ]---
>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629049] crystalhd 0000:02:00.0: F/w Signature mismatch
>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629065] crystalhd 0000:02:00.0: Firmware Download Failure!! - 21
>> Dec 29 15:58:33 vdr1 kernel: [ 5701.754795] crystalhd 0000:02:00.0: Closing user[0] handle via ioctl with mode 1417200
>>
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.281871] BUG: unable to handle kernel paging request at 6e757474
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] IP: [<6e757474>] 0x6e757473
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] *pdpt = 000000002fb8b001 *pde = 0000000000000000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Oops: 0010 [#6] PREEMPT
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>> snd_seq_midi_eve
>> n
>> t tveeprom videobuf_dma_sg
>> Dec 29 15:58:31 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Pid: 11926, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: 0060:[<6e757474>] EFLAGS: 00210206 CPU: 0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP is at 0x6e757474
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EAX: 726f6863 EBX: c538c000 ECX: 00000000 EDX: 00001c08
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] ESI: 000251ac EDI: fb55c1a8 EBP: c8497ea8 ESP: c8497e74
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR0: 8005003b CR2: 6e757474 CR3: 34276000 CR4: 000007f0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR6: ffff0ff0 DR7: 00000400
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Process mplayer (pid: 11926, ti=c8496000 task=f48c8000 task.ti=c8496000)
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Stack:
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa18a556 ffffffbe c117e3f6 00000060 00210246 002a8464 f7138064 fb537000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  002a8440 c117e811 f5920988 fb537000 c538c000 c8497ed8 fa18564d c8497ed8
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa182597 f595a000 f595a22c c8497ed8 fa182977 002a8464 f5920900 f595a000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Call Trace:
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18a556>] ? crystalhd_link_download_fw+0x176/0x300 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e3f6>] ? __copy_from_user_ll+0xd6/0xf0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18564d>] bc_cproc_download_fw+0xed/0x150 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182597>] ? chd_dec_proc_user_data+0x237/0x320 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa185560>] ? bc_proc_in_completion+0x70/0x70 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c136c865>] ? _raw_spin_lock+0x65/0x70
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c109c156>] ? handle_fasteoi_irq+0xb6/0xd0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ad1>] ? fget_light+0x101/0x120
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4a30>] ? fget_light+0x60/0x120
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c137238c>] sysenter_do_call+0x12/0x32
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Code:  Bad EIP value.
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: [<6e757474>] 0x6e757474 SS:ESP 0068:c8497e74
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR2: 000000006e757474
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.538480] ---[ end trace f5ae98f349325072 ]---
>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629049] crystalhd 0000:02:00.0: F/w Signature mismatch
>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629065] crystalhd 0000:02:00.0: Firmware Download Failure!! - 21
>> Dec 29 15:58:33 vdr1 kernel: [ 5701.754795] crystalhd 0000:02:00.0: Closing user[0] handle via ioctl with mode 1417200
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-media" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [BUG] crystalhd git.linuxtv.org kernel driver: unable to handle kernel paging requests, improper (spin)locking(?) and paging, null pointer oopses on SMP, libcrstalhd3-git i686 not interfacing to amd64 SMP 3.x kernel
  2013-01-03 15:17 ` Oliver Schinagl
  2013-01-05 12:21   ` [BUG] crystalhd git.linuxtv.org kernel driver: unable to handle kernel paging requests, improper (spin)locking(?) and paging, null pointer oopses on SMP, libcrstalhd3-git i686 not interfacing to amd64 SMP 3.x kernel thomas schorpp
@ 2013-01-05 12:44   ` thomas schorpp
  2013-01-07 23:33     ` [BUG] crystalhd git.linuxtv.org kernel driver: No more Oops or kernel crashes with Linux 3.2 thomas schorpp
  1 sibling, 1 reply; 11+ messages in thread
From: thomas schorpp @ 2013-01-05 12:44 UTC (permalink / raw)
  To: Oliver Schinagl; +Cc: linux-media, j, jarod, kkahn

[-- Attachment #1: Type: text/plain, Size: 35278 bytes --]

-Removed Broadcom kernel module authors prasadb@broadcom.com, nsankar@broadcom.com from CC list, unreachable, see att. Trying listed official Press contact instead-

Hi Oliver,  hi crystalhd users and devs,  hello Broadcom Crystal HD staff,

1.
sorry for the delay, I had to upgrade my old debian i386 stable...squeeze-backports userspace on the old core2duo machine to amd64 by full reinstall, otherwise the driver interface of libcrystalhd3 i686 to 3.6.10...3.7.1amd64 SMP kernel.org kernels has failed permanently,

please (anyone still running such a setup or You) try to confirm this and report to this thread.

lspci still shows the same PCI-E errors (see my other posts to this list) with the working libcrystalhd3 amd64 and broadcom designed crystalhd driver now, so
this data reported from the chipset or lspci has to be considered faulty or stale and irelevant now, I will build the latest lspci from source to crosscheck this.


Please build ffmpeg rel. 1.0.1(non-MT version, not later version, git master showed up with an audio format bug, presenting wrong audio sample format as planar (sfltp, fltp, s16p) which bino cannot handle and makes mplayer cry for not having libavresample access but which is disabled by default in ffmpeg configure defaults and debian dmo source packages )
from Your distro source package with --disable-decoders='h264, h264_vdpau, h264_vda' and leave only h264_crystalhd need as h.264 decoder

and so trigger crystalhd by every app on your system accessing h.264 content for parsing or decoding and linked to libavcodec (check binaries with ldd if linked against this libavcodec54, , in libavcodec53 h264_crystalhd is flagged CAP_EXPERIMENTAL, which makes it unaccesible by other apps than the ffmpeg program (-strict -2), mplayer: -vc ffh264crystalhd, or will fail --disable-decoders='h264, h264_vdpau, h264_vda')  like mplayer (not statically linked), kaffeine, vlc, gnome nautilus media file properties (uses mplayer -identify) sequentially called and then in parallel and record and post the Ooopses in this thread here until the authors return from winter sports ;-)
Note for Bino users: System requirement is at least debian squeeze-backports X and DRI, otherwise bino will segfault the dri driver, i965 here and you need to build libGLEW(mx) 1.6 from source for debian stable systems, see http://savannah.nongnu.org/bugs/?33368 http://bino3d.org/help-wanted.html

2.
With the new amd64 userspace on 3.7.1 SMP PREEMPT kernel things got even more worse here now, got 5 kernel panics in IRQ handler of the crystalhd driver in 1h while watching h.264 with
mplayer2/1 (single threaded decoding mode, stereo3d filter) resulting in system halting kernel crashes, I need to setup serial console debugging to get the logs, on my Pentium M i686 vdr machine, kernel has been able to continue at least after the null pointer oopses.
We need to have confirmation for this, too.

3.
Since the source code still states broadcom staff as module authors and the download on the broadcom website is packaged broken tar.bz2 and does not build here with recent kernels,
I'm CC'ing them now, too, and because it's their basic driver skeleton design and the quality and performance of this driver is far below the windows driver, which performs h.264 1080 great with http://mpc-hc.sourceforge.net at 5-10% cpu usage even on xp x64 on a i965, this should be the reference development target.

4.
The driver Makefile won't compile it with debian squeeze-backports 3.2 and 3.2 bpo kbuild infrastructure, missing helper scripts and includes, it needs a full ready build kernel from sources:

schorpp@tom3:/usr/local/src/crystalhd/driver/linux$ LC_ALL=C make
make -C /lib/modules/3.2.0-0.bpo.4-amd64/build SUBDIRS=/mnt/data/usr/local/src/crystalhd/driver/linux modules
make[1]: Entering directory `/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-amd64'
/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/Makefile:287: /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/scripts/Kbuild.include: Datei oder Verzeichnis nicht gefunden
/bin/bash: /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/scripts/gcc-x86_64-has-stack-protector.sh: Datei oder Verzeichnis nicht gefunden
/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/arch/x86/Makefile:81: stack protector enabled but no compiler support
/bin/bash: /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/scripts/gcc-goto.sh: Datei oder Verzeichnis nicht gefunden
make: *** Leerer Variablenname.  Schluss.
make[3]: *** [_module_/mnt/data/usr/local/src/crystalhd/driver/linux] Fehler 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-amd64'
make: *** [all] Error 2
schorpp@tom3:/usr/local/src/crystalhd/driver/linux$

5.
I'm focusing to the 3.x kernel source code delivered staging driver now (only BCM70012 support so far, no BCM70015) meanwhile unitil we get more information.

6.
Mythtv and xbmc people please join and report, too.

You can get a BCM70012 for just 10US$, a BCM700015 from 30US$ up on Ebay from china, mini-PCI-E to PCI-E adapter cards for not much more, I think it's worth playing ;-)

y
tom

Att: Oopscrash in IRQ- handler:

Jan  4 20:43:38 tom3 kernel: [  779.388263] crystalhd 0000:03:00.0: list_index:1 rx[23] rxtot[2031] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
Jan  4 20:43:38 tom3 kernel: [  779.435169] crystalhd 0000:03:00.0: list_index:1 rx[24] rxtot[2033] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
Jan  4 20:43:38 tom3 kernel: [  779.479479] crystalhd 0000:03:00.0: list_index:1 rx[25] rxtot[2035] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
Jan  4 20:43:38 tom3 kernel: [  779.569384] crystalhd 0000:03:00.0: MISSING 2 PICTURES
Jan  4 20:43:38 tom3 kernel: [  779.614878] crystalhd 0000:03:00.0: MISSING 3 PICTURES
Jan  4 20:43:38 tom3 kernel: [  779.662146] crystalhd 0000:03:00.0: MISSING 2 PICTURES
Jan  4 20:43:38 tom3 kernel: [  779.828924] crystalhd 0000:03:00.0: list_index:1 rx[26] rxtot[2057] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
Jan  4 20:43:38 tom3 kernel: [  779.890531] BUG: unable to handle kernel NULL pointer dereference at 000000000000002c
Jan  4 20:43:38 tom3 kernel: [  779.890668] IP: [<ffffffffa03ce0a0>] crystalhd_dioq_fetch_wait+0x210/0x3e0 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.890800] PGD 1573f067 PUD 4a2bf067 PMD 0
Jan  4 20:43:38 tom3 kernel: [  779.890888] Oops: 0000 [#1] PREEMPT SMP
Jan  4 20:43:38 tom3 kernel: [  779.890974] Modules linked in: nfsv4 nfs fscache uinput parport_pc ppdev lp parport bridge stp llc bnep rfcomm bluetooth nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs cpufreq_powersave cpufreq_stats cpufreq_conservative cpufreq_performance cpufreq_ondemand fuse dm_mod ext3 jbd pciehp arc4 ath5k ath mac80211 snd_hda_codec_analog cfg80211 snd_hda_intel snd_usb_audio snd_hda_codec snd_hwdep snd_pcm_oss thinkpad_acpi snd_mixer_oss rfkill snd_usbmidi_lib snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer pcmcia snd_seq_device psmouse snd yenta_socket tpm_tis pcmcia_rsrc acpi_cpufreq tpm pcmcia_core crystalhd(O) coretemp pcspkr soundcore i2c_i801 serio_raw led_class snd_page_alloc freq_table tpm_bios battery ac nvram rtc_cmos hid_generic wmi mperf evdev processor nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit xt_tcpudp iptable_filter ip_t

ables x_tables usb_storage
Jan  4 20:43:38 tom3 kernel: ext4 mbcache jbd2 crc16 usbhid hid sg sd_mod crc_t10dif ata_generic uhci_hcd ahci libahci ata_piix atkbd libata xhci_hcd thermal ehci_hcd usbcore e1000e usb_common
Jan  4 20:43:38 tom3 kernel: [  779.891477] CPU 0
Jan  4 20:43:38 tom3 kernel: [  779.891477] Pid: 6837, comm: mplayer2 Tainted: G           O 3.7.1 #10 LENOVO 7735Y1T/7735Y1T
Jan  4 20:43:38 tom3 kernel: [  779.891477] RIP: 0010:[<ffffffffa03ce0a0>]  [<ffffffffa03ce0a0>] crystalhd_dioq_fetch_wait+0x210/0x3e0 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477] RSP: 0018:ffff88004a387d28  EFLAGS: 00010246
Jan  4 20:43:38 tom3 kernel: [  779.891477] RAX: 0000000000000000 RBX: ffff88004a32bf00 RCX: 0000000000000000
Jan  4 20:43:38 tom3 kernel: [  779.891477] RDX: 0000000000000046 RSI: ffffffffa03cd57b RDI: ffffffff814d6881
Jan  4 20:43:38 tom3 kernel: [  779.891477] RBP: ffff88004a387dd8 R08: 0000000000000000 R09: 0000000000000001
Jan  4 20:43:38 tom3 kernel: [  779.891477] R10: 0000000000000000 R11: 0000000000000001 R12: ffff880079e490c0
Jan  4 20:43:38 tom3 kernel: [  779.891477] R13: 0000000000000000 R14: ffff880079e490e8 R15: ffff88004a32bf00
Jan  4 20:43:38 tom3 kernel: [  779.891477] FS:  00007fe394b83780(0000) GS:ffff88007f400000(0000) knlGS:0000000000000000
Jan  4 20:43:38 tom3 kernel: [  779.891477] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jan  4 20:43:38 tom3 kernel: [  779.891477] CR2: 000000000000002c CR3: 00000000157f1000 CR4: 00000000000007f0
Jan  4 20:43:38 tom3 kernel: [  779.891477] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Jan  4 20:43:38 tom3 kernel: [  779.891477] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Jan  4 20:43:38 tom3 kernel: [  779.891477] Process mplayer2 (pid: 6837, threadinfo ffff88004a386000, task ffff88004a32bf00)
Jan  4 20:43:38 tom3 kernel: [  779.891477] Stack:
Jan  4 20:43:38 tom3 kernel: [  779.891477]  ffff88004a32c5c0 000003448106c4f6 ffff88007aed2a00 ffff88007c162098
Jan  4 20:43:38 tom3 kernel: [  779.891477]  ffff88004a387df4 ffff8800157529b0 ffff880015752800 ffff88004a32bf00
Jan  4 20:43:38 tom3 kernel: [  779.891477]  ffff880079e49120 0000000100075a56 0000000000000000 ffff88004a32bf00
Jan  4 20:43:38 tom3 kernel: [  779.891477] Call Trace:
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff81079df0>] ? try_to_wake_up+0x230/0x230
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03cf680>] ? bc_cproc_start_capture+0xf0/0xf0 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03d13de>] crystalhd_hw_get_cap_buffer+0x6e/0x180 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03cf73d>] bc_cproc_fetch_frame+0xbd/0x1b0 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03ccdab>] chd_dec_api_cmd+0xab/0x100 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03ccf42>] chd_dec_ioctl+0x142/0x160 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff81181d6a>] do_vfs_ioctl+0x2da/0x310
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff8118d8f0>] ? fget_light+0x70/0x160
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff81181df7>] sys_ioctl+0x57/0x90
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff8123c79e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff814de802>] system_call_fastpath+0x16/0x1b
Jan  4 20:43:38 tom3 kernel: [  779.891477] Code: 87 10 e1 45 85 ed 0f 85 4f 01 00 00 48 8b bd 78 ff ff ff e8 a3 e4 c9 e0 85 c0 0f 85 4e 01 00 00 4c 89 e7 e8 b3 f3 ff ff 49 89 c0 <f6> 40 2c 03 0f 85 97 01 00 00 48 8b 4d 80 48 8b 81 d0 00 00 00
Jan  4 20:43:38 tom3 kernel: [  779.891477] RIP  [<ffffffffa03ce0a0>] crystalhd_dioq_fetch_wait+0x210/0x3e0 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477]  RSP <ffff88004a387d28>
Jan  4 20:43:38 tom3 kernel: [  779.891477] CR2: 000000000000002c
Jan  4 20:43:38 tom3 kernel: [  779.912578] delay: estimated 384, actual 0
Jan  4 20:43:38 tom3 kernel: [  779.912610] delay: estimated 384, actual 48
Jan  4 20:43:38 tom3 kernel: [  779.914258] ---[ end trace b4d3d5bb1ad97fd7 ]---
Jan  4 20:46:05 tom3 kernel: [  926.565061] SysRq : Emergency Remount R/O


On 03.01.2013 16:17, Oliver Schinagl wrote:
> I actually am one of the few that has one of those decoders so should be able to test things when needed. Just let me know what to test and I will try to comply
>
> On 02-01-13 08:48, thomas schorpp wrote:
>> Hello guys,
>>
>> I'm working on supporting BCM 970012/15 crystalhd decoder in userspace video/tv apps and
>>
>> can't find where to report bugs of
>>
>> http://git.linuxtv.org/jarod/crystalhd.git
>> <devinheitmueller> I think he just borrowed our git server.
>>
>> So I borrow this list to get more developers, testers and sw- quality guys in.
>>
>> Forgot to mention the attached Oopses under high load and "multithreading" in half automated stress/mass testing.
>>
>> Scenario e.g.:
>> Dec 29 15:58:29 vdr1 kernel: [ 5698.364950] crystalhd 0000:02:00.0: Opening new user[0] handle
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.557932] crystalhd 0000:02:00.0: Opening new user[0] handle
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.846312] crystalhd 0000:02:00.0: Close the handle first..
>>
>> Looks like the driver is not "threadsave", rebuilding kernel with spinlock debugging, should show more up.
>>
>> y
>> tom
>>
>> -Att: Kernel OOPS bt, etc
>>
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568671] BUG: unable to handle kernel paging request at 2062696c
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568678] IP: [<2062696c>] 0x2062696b
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568681] *pdpt = 0000000008497001 *pde = 0000000000000000
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568684] Oops: 0010 [#4] PREEMPT
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568731] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>> snd_seq_midi_eve
>> n
>> t tveeprom videobuf_dma_sg
>> Dec 29 15:56:10 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568770] Pid: 11841, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568772] EIP: 0060:[<2062696c>] EFLAGS: 00010286 CPU: 0
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568775] EIP is at 0x2062696c
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568777] EAX: 00370042 EBX: c843c000 ECX: 636e3800 EDX: 00001c10
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568778] ESI: 000238fc EDI: fb0068fc EBP: c842dea8 ESP: c842de74
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568780]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568781] CR0: 8005003b CR2: 2062696c CR3: 084d9000 CR4: 000007f0
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568783] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568784] DR6: ffff0ff0 DR7: 00000400
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568786] Process mplayer (pid: 11841, ti=c842c000 task=f0aba940 task.ti=c842c000)
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568787] Stack:
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568793]  fa18a569 ffffff10 c117e3f6 00000060 00010246 002a8464 f7138064 fafe3000
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568798]  002a8440 c117e811 f5920988 fafe3000 c843c000 c842ded8 fa18564d c842ded8
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568803]  fa182597 f595a400 f595a62c c842ded8 fa182977 002a8464 f5920900 f595a400
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568804] Call Trace:
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568818]  [<fa18a569>] ? crystalhd_link_download_fw+0x189/0x300 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568823]  [<c117e3f6>] ? __copy_from_user_ll+0xd6/0xf0
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568828]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568839]  [<fa18564d>] bc_cproc_download_fw+0xed/0x150 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568846]  [<fa182597>] ? chd_dec_proc_user_data+0x237/0x320 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568854]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568861]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568870]  [<fa185560>] ? bc_proc_in_completion+0x70/0x70 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568877]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568881]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568886]  [<c10685ef>] ? ktime_get+0x6f/0xf0
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568891]  [<c101ca56>] ? lapic_next_event+0x16/0x20
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568895]  [<c106f287>] ? clockevents_program_event+0xe7/0x130
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568898]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568901]  [<c10e4ad1>] ? fget_light+0x101/0x120
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568904]  [<c10e4a30>] ? fget_light+0x60/0x120
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568906]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568910]  [<c137238c>] sysenter_do_call+0x12/0x32
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568914]  [<c1360000>] ? asus_hides_smbus_hostbridge+0x264/0x269
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568917] Code:  Bad EIP value.
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568922] EIP: [<2062696c>] 0x2062696c SS:ESP 0068:c842de74
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568923] CR2: 000000002062696c
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568926] ---[ end trace f5ae98f349325070 ]---
>>
>> Dec 29 15:58:29 vdr1 kernel: [ 5698.364950] crystalhd 0000:02:00.0: Opening new user[0] handle
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.557932] crystalhd 0000:02:00.0: Opening new user[0] handle
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.846312] crystalhd 0000:02:00.0: Close the handle first..
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.858268] crystalhd 0000:02:00.0: Closing user[0] handle via ioctl with mode 1417200
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.961171] crystalhd_hw_stats: Invalid Arguments
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.961204] BUG: unable to handle kernel NULL pointer dereference at 00000040
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] IP: [<c11848d8>] do_raw_spin_trylock+0x8/0x50
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] *pdpt = 0000000030a1d001 *pde = 0000000000000000
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Oops: 0000 [#5] PREEMPT
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>> snd_seq_midi_eve
>> n
>> t tveeprom videobuf_dma_sg
>> Dec 29 15:58:30 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Pid: 11927, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP: 0060:[<c11848d8>] EFLAGS: 00210046 CPU: 0
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP is at do_raw_spin_trylock+0x8/0x50
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EAX: 00000040 EBX: 00000000 ECX: 00000040 EDX: 00000000
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] ESI: 00000040 EDI: 00200292 EBP: c85a7e5c ESP: c85a7e58
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] CR0: 8005003b CR2: 00000040 CR3: 34276000 CR4: 000007f0
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] DR6: ffff0ff0 DR7: 00000400
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Process mplayer (pid: 11927, ti=c85a6000 task=f48ce720 task.ti=c85a6000)
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Stack:
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  00000050 c85a7e80 c136c9b5 00000000 00000002 00000000 fa184bd6 f5955c00
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  f5920988 00000000 c85a7ed8 fa184bd6 00000218 c85a6000 00000000 c85a7eb0
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  c117e811 09ce6618 0c955c00 f5955c00 00000000 09ce6618 c85a7ed8 fa1823b9
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Call Trace:
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c136c9b5>] _raw_spin_lock_irqsave+0x55/0x90
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa184bd6>] ? bc_cproc_get_stats+0x226/0x280 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa184bd6>] bc_cproc_get_stats+0x226/0x280 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1823b9>] ? chd_dec_proc_user_data+0x59/0x320 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1849b0>] ? bc_cproc_reset_stats+0x20/0x20 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c104e73e>] ? hrtimer_nanosleep+0x6e/0xf0
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4ad1>] ? fget_light+0x101/0x120
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4a30>] ? fget_light+0x60/0x120
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c137238c>] sysenter_do_call+0x12/0x32
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Code: a2 66 90 c7 43 08 00 00 00 00 8b 75 f8 8b 7d fc a1 2c dc 4e c1 89 43 0c 8b 5d f4 89 ec 5d c3 8d 74 26 00 55 89 c1 89 e5 53 31 db <8b> 00 c7 01 00 00 00 00 84 c0 0f 9f c3 85 db 74 17 a1 2c dc 4e
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP: [<c11848d8>] do_raw_spin_trylock+0x8/0x50 SS:ESP 0068:c85a7e58
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] CR2: 0000000000000040
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] ---[ end trace f5ae98f349325071 ]---
>> Dec 29 15:58:30 vdr1 kernel: [ 5699.232992] note: mplayer[11927] exited with preempt_count 1
>> Dec 29 15:58:30 vdr1 kernel: [ 5699.251706] crystalhd 0000:02:00.0: Opening new user[0] handle
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.281871] BUG: unable to handle kernel paging request at 6e757474
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] IP: [<6e757474>] 0x6e757473
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] *pdpt = 000000002fb8b001 *pde = 0000000000000000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Oops: 0010 [#6] PREEMPT
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>> snd_seq_midi_eve
>> n
>> t tveeprom videobuf_dma_sg
>> Dec 29 15:58:31 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Pid: 11926, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: 0060:[<6e757474>] EFLAGS: 00210206 CPU: 0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP is at 0x6e757474
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EAX: 726f6863 EBX: c538c000 ECX: 00000000 EDX: 00001c08
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] ESI: 000251ac EDI: fb55c1a8 EBP: c8497ea8 ESP: c8497e74
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR0: 8005003b CR2: 6e757474 CR3: 34276000 CR4: 000007f0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR6: ffff0ff0 DR7: 00000400
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Process mplayer (pid: 11926, ti=c8496000 task=f48c8000 task.ti=c8496000)
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Stack:
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa18a556 ffffffbe c117e3f6 00000060 00210246 002a8464 f7138064 fb537000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  002a8440 c117e811 f5920988 fb537000 c538c000 c8497ed8 fa18564d c8497ed8
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa182597 f595a000 f595a22c c8497ed8 fa182977 002a8464 f5920900 f595a000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Call Trace:
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18a556>] ? crystalhd_link_download_fw+0x176/0x300 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e3f6>] ? __copy_from_user_ll+0xd6/0xf0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18564d>] bc_cproc_download_fw+0xed/0x150 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182597>] ? chd_dec_proc_user_data+0x237/0x320 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa185560>] ? bc_proc_in_completion+0x70/0x70 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c136c865>] ? _raw_spin_lock+0x65/0x70
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c109c156>] ? handle_fasteoi_irq+0xb6/0xd0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ad1>] ? fget_light+0x101/0x120
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4a30>] ? fget_light+0x60/0x120
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c137238c>] sysenter_do_call+0x12/0x32
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Code:  Bad EIP value.
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: [<6e757474>] 0x6e757474 SS:ESP 0068:c8497e74
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR2: 000000006e757474
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.538480] ---[ end trace f5ae98f349325072 ]---
>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629049] crystalhd 0000:02:00.0: F/w Signature mismatch
>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629065] crystalhd 0000:02:00.0: Firmware Download Failure!! - 21
>> Dec 29 15:58:33 vdr1 kernel: [ 5701.754795] crystalhd 0000:02:00.0: Closing user[0] handle via ioctl with mode 1417200
>>
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.281871] BUG: unable to handle kernel paging request at 6e757474
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] IP: [<6e757474>] 0x6e757473
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] *pdpt = 000000002fb8b001 *pde = 0000000000000000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Oops: 0010 [#6] PREEMPT
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>> snd_seq_midi_eve
>> n
>> t tveeprom videobuf_dma_sg
>> Dec 29 15:58:31 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Pid: 11926, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: 0060:[<6e757474>] EFLAGS: 00210206 CPU: 0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP is at 0x6e757474
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EAX: 726f6863 EBX: c538c000 ECX: 00000000 EDX: 00001c08
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] ESI: 000251ac EDI: fb55c1a8 EBP: c8497ea8 ESP: c8497e74
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR0: 8005003b CR2: 6e757474 CR3: 34276000 CR4: 000007f0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR6: ffff0ff0 DR7: 00000400
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Process mplayer (pid: 11926, ti=c8496000 task=f48c8000 task.ti=c8496000)
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Stack:
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa18a556 ffffffbe c117e3f6 00000060 00210246 002a8464 f7138064 fb537000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  002a8440 c117e811 f5920988 fb537000 c538c000 c8497ed8 fa18564d c8497ed8
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa182597 f595a000 f595a22c c8497ed8 fa182977 002a8464 f5920900 f595a000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Call Trace:
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18a556>] ? crystalhd_link_download_fw+0x176/0x300 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e3f6>] ? __copy_from_user_ll+0xd6/0xf0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18564d>] bc_cproc_download_fw+0xed/0x150 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182597>] ? chd_dec_proc_user_data+0x237/0x320 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa185560>] ? bc_proc_in_completion+0x70/0x70 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c136c865>] ? _raw_spin_lock+0x65/0x70
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c109c156>] ? handle_fasteoi_irq+0xb6/0xd0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ad1>] ? fget_light+0x101/0x120
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4a30>] ? fget_light+0x60/0x120
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c137238c>] sysenter_do_call+0x12/0x32
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Code:  Bad EIP value.
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: [<6e757474>] 0x6e757474 SS:ESP 0068:c8497e74
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR2: 000000006e757474
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.538480] ---[ end trace f5ae98f349325072 ]---
>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629049] crystalhd 0000:02:00.0: F/w Signature mismatch
>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629065] crystalhd 0000:02:00.0: Firmware Download Failure!! - 21
>> Dec 29 15:58:33 vdr1 kernel: [ 5701.754795] crystalhd 0000:02:00.0: Closing user[0] handle via ioctl with mode 1417200
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-media" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>


[-- Attachment #2: Attached Message --]
[-- Type: message/rfc822, Size: 39606 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 443 bytes --]

Your message was not delivered.  Please validate recipient email address
and try again.  The headers of the email is as follows:

Subject: Re: [BUG] crystalhd git.linuxtv.org kernel driver: unable to
handle kernel paging requests, improper (spin)locking(?) and paging,
null pointer oopses on SMP, libcrstalhd3-git i686 not interfacing to
amd64 SMP 3.x kernel
Recipients: <prasadb@broadcom.com>, <nsankar@broadcom.com>
Date: 01/05/13, 04:18:17

[-- Attachment #2.1.2: Type: message/rfc822, Size: 37699 bytes --]

From: "thomas schorpp" <thomas.schorpp@gmail.com>
To: "Oliver Schinagl" <oliver+list@schinagl.nl>
Cc: linux-media@vger.kernel.org, j@jannau.net, jarod@redhat.com, prasadb@broadcom.com, nsankar@broadcom.com
Subject: Re: [BUG] crystalhd git.linuxtv.org kernel driver: unable to handle kernel paging requests, improper (spin)locking(?) and paging, null pointer oopses on SMP, libcrstalhd3-git i686 not interfacing to amd64 SMP 3.x kernel
Date: Sat, 05 Jan 2013 13:21:08 +0100
Message-ID: <50E81AB4.7020706@gmail.com>

Hi Oliver,  hi crystalhd users and devs,  hello Broadcom Crystal HD staff,

1.
sorry for the delay, I had to upgrade my old debian i386 stable...squeeze-backports userspace on the old core2duo machine to amd64 by full reinstall, otherwise the driver interface of libcrystalhd3 i686 to 3.6.10...3.7.1amd64 SMP kernel.org kernels has failed permanently,

please (anyone still running such a setup or You) try to confirm this and report to this thread.

lspci still shows the same PCI-E errors (see my other posts to this list) with the working libcrystalhd3 amd64 and broadcom designed crystalhd driver now, so
this data reported from the chipset or lspci has to be considered faulty or stale and irelevant now, I will build the latest lspci from source to crosscheck this.


Please build ffmpeg rel. 1.0.1(non-MT version, not later version, git master showed up with an audio format bug, presenting wrong audio sample format as planar (sfltp, fltp, s16p) which bino cannot handle and makes mplayer cry for not having libavresample access but which is disabled by default in ffmpeg configure defaults and debian dmo source packages )
from Your distro source package with --disable-decoders='h264, h264_vdpau, h264_vda' and leave only h264_crystalhd need as h.264 decoder

and so trigger crystalhd by every app on your system accessing h.264 content for parsing or decoding and linked to libavcodec (check binaries with ldd if linked against this libavcodec54, , in libavcodec53 h264_crystalhd is flagged CAP_EXPERIMENTAL, which makes it unaccesible by other apps than the ffmpeg program (-strict -2), mplayer: -vc ffh264crystalhd, or will fail --disable-decoders='h264, h264_vdpau, h264_vda')  like mplayer (not statically linked), kaffeine, vlc, gnome nautilus media file properties (uses mplayer -identify) sequentially called and then in parallel and record and post the Ooopses in this thread here until the authors return from winter sports ;-)
Note for Bino users: System requirement is at least debian squeeze-backports X and DRI, otherwise bino will segfault the dri driver, i965 here and you need to build libGLEW(mx) 1.6 from source for debian stable systems, see http://savannah.nongnu.org/bugs/?33368 http://bino3d.org/help-wanted.html

2.
With the new amd64 userspace on 3.7.1 SMP PREEMPT kernel things got even more worse here now, got 5 kernel panics in IRQ handler of the crystalhd driver in 1h while watching h.264 with
mplayer2/1 (single threaded decoding mode, stereo3d filter) resulting in system halting kernel crashes, I need to setup serial console debugging to get the logs, on my Pentium M i686 vdr machine, kernel has been able to continue at least after the null pointer oopses.
We need to have confirmation for this, too.

3.
Since the source code still states broadcom staff as module authors and the download on the broadcom website is packaged broken tar.bz2 and does not build here with recent kernels,
I'm CC'ing them now, too, and because it's their basic driver skeleton design and the quality and performance of this driver is far below the windows driver, which performs h.264 1080 great with http://mpc-hc.sourceforge.net at 5-10% cpu usage even on xp x64 on a i965, this should be the reference development target.

4.
The driver Makefile won't compile it with debian squeeze-backports 3.2 and 3.2 bpo kbuild infrastructure, missing helper scripts and includes, it needs a full ready build kernel from sources:

schorpp@tom3:/usr/local/src/crystalhd/driver/linux$ LC_ALL=C make
make -C /lib/modules/3.2.0-0.bpo.4-amd64/build SUBDIRS=/mnt/data/usr/local/src/crystalhd/driver/linux modules
make[1]: Entering directory `/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-amd64'
/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/Makefile:287: /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/scripts/Kbuild.include: Datei oder Verzeichnis nicht gefunden
/bin/bash: /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/scripts/gcc-x86_64-has-stack-protector.sh: Datei oder Verzeichnis nicht gefunden
/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/arch/x86/Makefile:81: stack protector enabled but no compiler support
/bin/bash: /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/scripts/gcc-goto.sh: Datei oder Verzeichnis nicht gefunden
make: *** Leerer Variablenname.  Schluss.
make[3]: *** [_module_/mnt/data/usr/local/src/crystalhd/driver/linux] Fehler 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-amd64'
make: *** [all] Error 2
schorpp@tom3:/usr/local/src/crystalhd/driver/linux$

5.
I'm focusing to the 3.x kernel source code delivered staging driver now (only BCM70012 support so far, no BCM70015) meanwhile unitil we get more information.

6.
Mythtv and xbmc people please join and report, too.

You can get a BCM70012 for just 10US$, a BCM700015 from 30US$ up on Ebay from china, mini-PCI-E to PCI-E adapter cards for not much more, I think it's worth playing ;-)

y
tom

Att: Oopscrash in IRQ- handler:

Jan  4 20:43:38 tom3 kernel: [  779.388263] crystalhd 0000:03:00.0: list_index:1 rx[23] rxtot[2031] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
Jan  4 20:43:38 tom3 kernel: [  779.435169] crystalhd 0000:03:00.0: list_index:1 rx[24] rxtot[2033] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
Jan  4 20:43:38 tom3 kernel: [  779.479479] crystalhd 0000:03:00.0: list_index:1 rx[25] rxtot[2035] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
Jan  4 20:43:38 tom3 kernel: [  779.569384] crystalhd 0000:03:00.0: MISSING 2 PICTURES
Jan  4 20:43:38 tom3 kernel: [  779.614878] crystalhd 0000:03:00.0: MISSING 3 PICTURES
Jan  4 20:43:38 tom3 kernel: [  779.662146] crystalhd 0000:03:00.0: MISSING 2 PICTURES
Jan  4 20:43:38 tom3 kernel: [  779.828924] crystalhd 0000:03:00.0: list_index:1 rx[26] rxtot[2057] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
Jan  4 20:43:38 tom3 kernel: [  779.890531] BUG: unable to handle kernel NULL pointer dereference at 000000000000002c
Jan  4 20:43:38 tom3 kernel: [  779.890668] IP: [<ffffffffa03ce0a0>] crystalhd_dioq_fetch_wait+0x210/0x3e0 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.890800] PGD 1573f067 PUD 4a2bf067 PMD 0
Jan  4 20:43:38 tom3 kernel: [  779.890888] Oops: 0000 [#1] PREEMPT SMP
Jan  4 20:43:38 tom3 kernel: [  779.890974] Modules linked in: nfsv4 nfs fscache uinput parport_pc ppdev lp parport bridge stp llc bnep rfcomm bluetooth nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs cpufreq_powersave cpufreq_stats cpufreq_conservative cpufreq_performance cpufreq_ondemand fuse dm_mod ext3 jbd pciehp arc4 ath5k ath mac80211 snd_hda_codec_analog cfg80211 snd_hda_intel snd_usb_audio snd_hda_codec snd_hwdep snd_pcm_oss thinkpad_acpi snd_mixer_oss rfkill snd_usbmidi_lib snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer pcmcia snd_seq_device psmouse snd yenta_socket tpm_tis pcmcia_rsrc acpi_cpufreq tpm pcmcia_core crystalhd(O) coretemp pcspkr soundcore i2c_i801 serio_raw led_class snd_page_alloc freq_table tpm_bios battery ac nvram rtc_cmos hid_generic wmi mperf evdev processor nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit xt_tcpudp iptable_filter ip_t
ables x_tables usb_storage
Jan  4 20:43:38 tom3 kernel: ext4 mbcache jbd2 crc16 usbhid hid sg sd_mod crc_t10dif ata_generic uhci_hcd ahci libahci ata_piix atkbd libata xhci_hcd thermal ehci_hcd usbcore e1000e usb_common
Jan  4 20:43:38 tom3 kernel: [  779.891477] CPU 0
Jan  4 20:43:38 tom3 kernel: [  779.891477] Pid: 6837, comm: mplayer2 Tainted: G           O 3.7.1 #10 LENOVO 7735Y1T/7735Y1T
Jan  4 20:43:38 tom3 kernel: [  779.891477] RIP: 0010:[<ffffffffa03ce0a0>]  [<ffffffffa03ce0a0>] crystalhd_dioq_fetch_wait+0x210/0x3e0 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477] RSP: 0018:ffff88004a387d28  EFLAGS: 00010246
Jan  4 20:43:38 tom3 kernel: [  779.891477] RAX: 0000000000000000 RBX: ffff88004a32bf00 RCX: 0000000000000000
Jan  4 20:43:38 tom3 kernel: [  779.891477] RDX: 0000000000000046 RSI: ffffffffa03cd57b RDI: ffffffff814d6881
Jan  4 20:43:38 tom3 kernel: [  779.891477] RBP: ffff88004a387dd8 R08: 0000000000000000 R09: 0000000000000001
Jan  4 20:43:38 tom3 kernel: [  779.891477] R10: 0000000000000000 R11: 0000000000000001 R12: ffff880079e490c0
Jan  4 20:43:38 tom3 kernel: [  779.891477] R13: 0000000000000000 R14: ffff880079e490e8 R15: ffff88004a32bf00
Jan  4 20:43:38 tom3 kernel: [  779.891477] FS:  00007fe394b83780(0000) GS:ffff88007f400000(0000) knlGS:0000000000000000
Jan  4 20:43:38 tom3 kernel: [  779.891477] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jan  4 20:43:38 tom3 kernel: [  779.891477] CR2: 000000000000002c CR3: 00000000157f1000 CR4: 00000000000007f0
Jan  4 20:43:38 tom3 kernel: [  779.891477] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Jan  4 20:43:38 tom3 kernel: [  779.891477] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Jan  4 20:43:38 tom3 kernel: [  779.891477] Process mplayer2 (pid: 6837, threadinfo ffff88004a386000, task ffff88004a32bf00)
Jan  4 20:43:38 tom3 kernel: [  779.891477] Stack:
Jan  4 20:43:38 tom3 kernel: [  779.891477]  ffff88004a32c5c0 000003448106c4f6 ffff88007aed2a00 ffff88007c162098
Jan  4 20:43:38 tom3 kernel: [  779.891477]  ffff88004a387df4 ffff8800157529b0 ffff880015752800 ffff88004a32bf00
Jan  4 20:43:38 tom3 kernel: [  779.891477]  ffff880079e49120 0000000100075a56 0000000000000000 ffff88004a32bf00
Jan  4 20:43:38 tom3 kernel: [  779.891477] Call Trace:
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff81079df0>] ? try_to_wake_up+0x230/0x230
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03cf680>] ? bc_cproc_start_capture+0xf0/0xf0 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03d13de>] crystalhd_hw_get_cap_buffer+0x6e/0x180 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03cf73d>] bc_cproc_fetch_frame+0xbd/0x1b0 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03ccdab>] chd_dec_api_cmd+0xab/0x100 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03ccf42>] chd_dec_ioctl+0x142/0x160 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff81181d6a>] do_vfs_ioctl+0x2da/0x310
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff8118d8f0>] ? fget_light+0x70/0x160
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff81181df7>] sys_ioctl+0x57/0x90
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff8123c79e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff814de802>] system_call_fastpath+0x16/0x1b
Jan  4 20:43:38 tom3 kernel: [  779.891477] Code: 87 10 e1 45 85 ed 0f 85 4f 01 00 00 48 8b bd 78 ff ff ff e8 a3 e4 c9 e0 85 c0 0f 85 4e 01 00 00 4c 89 e7 e8 b3 f3 ff ff 49 89 c0 <f6> 40 2c 03 0f 85 97 01 00 00 48 8b 4d 80 48 8b 81 d0 00 00 00
Jan  4 20:43:38 tom3 kernel: [  779.891477] RIP  [<ffffffffa03ce0a0>] crystalhd_dioq_fetch_wait+0x210/0x3e0 [crystalhd]
Jan  4 20:43:38 tom3 kernel: [  779.891477]  RSP <ffff88004a387d28>
Jan  4 20:43:38 tom3 kernel: [  779.891477] CR2: 000000000000002c
Jan  4 20:43:38 tom3 kernel: [  779.912578] delay: estimated 384, actual 0
Jan  4 20:43:38 tom3 kernel: [  779.912610] delay: estimated 384, actual 48
Jan  4 20:43:38 tom3 kernel: [  779.914258] ---[ end trace b4d3d5bb1ad97fd7 ]---
Jan  4 20:46:05 tom3 kernel: [  926.565061] SysRq : Emergency Remount R/O


On 03.01.2013 16:17, Oliver Schinagl wrote:
> I actually am one of the few that has one of those decoders so should be able to test things when needed. Just let me know what to test and I will try to comply
>
> On 02-01-13 08:48, thomas schorpp wrote:
>> Hello guys,
>>
>> I'm working on supporting BCM 970012/15 crystalhd decoder in userspace video/tv apps and
>>
>> can't find where to report bugs of
>>
>> http://git.linuxtv.org/jarod/crystalhd.git
>> <devinheitmueller> I think he just borrowed our git server.
>>
>> So I borrow this list to get more developers, testers and sw- quality guys in.
>>
>> Forgot to mention the attached Oopses under high load and "multithreading" in half automated stress/mass testing.
>>
>> Scenario e.g.:
>> Dec 29 15:58:29 vdr1 kernel: [ 5698.364950] crystalhd 0000:02:00.0: Opening new user[0] handle
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.557932] crystalhd 0000:02:00.0: Opening new user[0] handle
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.846312] crystalhd 0000:02:00.0: Close the handle first..
>>
>> Looks like the driver is not "threadsave", rebuilding kernel with spinlock debugging, should show more up.
>>
>> y
>> tom
>>
>> -Att: Kernel OOPS bt, etc
>>
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568671] BUG: unable to handle kernel paging request at 2062696c
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568678] IP: [<2062696c>] 0x2062696b
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568681] *pdpt = 0000000008497001 *pde = 0000000000000000
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568684] Oops: 0010 [#4] PREEMPT
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568731] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>> snd_seq_midi_eve
>> n
>> t tveeprom videobuf_dma_sg
>> Dec 29 15:56:10 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568770] Pid: 11841, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568772] EIP: 0060:[<2062696c>] EFLAGS: 00010286 CPU: 0
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568775] EIP is at 0x2062696c
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568777] EAX: 00370042 EBX: c843c000 ECX: 636e3800 EDX: 00001c10
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568778] ESI: 000238fc EDI: fb0068fc EBP: c842dea8 ESP: c842de74
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568780]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568781] CR0: 8005003b CR2: 2062696c CR3: 084d9000 CR4: 000007f0
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568783] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568784] DR6: ffff0ff0 DR7: 00000400
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568786] Process mplayer (pid: 11841, ti=c842c000 task=f0aba940 task.ti=c842c000)
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568787] Stack:
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568793]  fa18a569 ffffff10 c117e3f6 00000060 00010246 002a8464 f7138064 fafe3000
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568798]  002a8440 c117e811 f5920988 fafe3000 c843c000 c842ded8 fa18564d c842ded8
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568803]  fa182597 f595a400 f595a62c c842ded8 fa182977 002a8464 f5920900 f595a400
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568804] Call Trace:
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568818]  [<fa18a569>] ? crystalhd_link_download_fw+0x189/0x300 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568823]  [<c117e3f6>] ? __copy_from_user_ll+0xd6/0xf0
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568828]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568839]  [<fa18564d>] bc_cproc_download_fw+0xed/0x150 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568846]  [<fa182597>] ? chd_dec_proc_user_data+0x237/0x320 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568854]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568861]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568870]  [<fa185560>] ? bc_proc_in_completion+0x70/0x70 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568877]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568881]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568886]  [<c10685ef>] ? ktime_get+0x6f/0xf0
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568891]  [<c101ca56>] ? lapic_next_event+0x16/0x20
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568895]  [<c106f287>] ? clockevents_program_event+0xe7/0x130
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568898]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568901]  [<c10e4ad1>] ? fget_light+0x101/0x120
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568904]  [<c10e4a30>] ? fget_light+0x60/0x120
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568906]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568910]  [<c137238c>] sysenter_do_call+0x12/0x32
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568914]  [<c1360000>] ? asus_hides_smbus_hostbridge+0x264/0x269
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568917] Code:  Bad EIP value.
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568922] EIP: [<2062696c>] 0x2062696c SS:ESP 0068:c842de74
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568923] CR2: 000000002062696c
>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568926] ---[ end trace f5ae98f349325070 ]---
>>
>> Dec 29 15:58:29 vdr1 kernel: [ 5698.364950] crystalhd 0000:02:00.0: Opening new user[0] handle
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.557932] crystalhd 0000:02:00.0: Opening new user[0] handle
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.846312] crystalhd 0000:02:00.0: Close the handle first..
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.858268] crystalhd 0000:02:00.0: Closing user[0] handle via ioctl with mode 1417200
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.961171] crystalhd_hw_stats: Invalid Arguments
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.961204] BUG: unable to handle kernel NULL pointer dereference at 00000040
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] IP: [<c11848d8>] do_raw_spin_trylock+0x8/0x50
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] *pdpt = 0000000030a1d001 *pde = 0000000000000000
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Oops: 0000 [#5] PREEMPT
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>> snd_seq_midi_eve
>> n
>> t tveeprom videobuf_dma_sg
>> Dec 29 15:58:30 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Pid: 11927, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP: 0060:[<c11848d8>] EFLAGS: 00210046 CPU: 0
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP is at do_raw_spin_trylock+0x8/0x50
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EAX: 00000040 EBX: 00000000 ECX: 00000040 EDX: 00000000
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] ESI: 00000040 EDI: 00200292 EBP: c85a7e5c ESP: c85a7e58
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] CR0: 8005003b CR2: 00000040 CR3: 34276000 CR4: 000007f0
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] DR6: ffff0ff0 DR7: 00000400
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Process mplayer (pid: 11927, ti=c85a6000 task=f48ce720 task.ti=c85a6000)
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Stack:
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  00000050 c85a7e80 c136c9b5 00000000 00000002 00000000 fa184bd6 f5955c00
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  f5920988 00000000 c85a7ed8 fa184bd6 00000218 c85a6000 00000000 c85a7eb0
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  c117e811 09ce6618 0c955c00 f5955c00 00000000 09ce6618 c85a7ed8 fa1823b9
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Call Trace:
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c136c9b5>] _raw_spin_lock_irqsave+0x55/0x90
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa184bd6>] ? bc_cproc_get_stats+0x226/0x280 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa184bd6>] bc_cproc_get_stats+0x226/0x280 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1823b9>] ? chd_dec_proc_user_data+0x59/0x320 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1849b0>] ? bc_cproc_reset_stats+0x20/0x20 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c104e73e>] ? hrtimer_nanosleep+0x6e/0xf0
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4ad1>] ? fget_light+0x101/0x120
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4a30>] ? fget_light+0x60/0x120
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c137238c>] sysenter_do_call+0x12/0x32
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Code: a2 66 90 c7 43 08 00 00 00 00 8b 75 f8 8b 7d fc a1 2c dc 4e c1 89 43 0c 8b 5d f4 89 ec 5d c3 8d 74 26 00 55 89 c1 89 e5 53 31 db <8b> 00 c7 01 00 00 00 00 84 c0 0f 9f c3 85 db 74 17 a1 2c dc 4e
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP: [<c11848d8>] do_raw_spin_trylock+0x8/0x50 SS:ESP 0068:c85a7e58
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] CR2: 0000000000000040
>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] ---[ end trace f5ae98f349325071 ]---
>> Dec 29 15:58:30 vdr1 kernel: [ 5699.232992] note: mplayer[11927] exited with preempt_count 1
>> Dec 29 15:58:30 vdr1 kernel: [ 5699.251706] crystalhd 0000:02:00.0: Opening new user[0] handle
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.281871] BUG: unable to handle kernel paging request at 6e757474
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] IP: [<6e757474>] 0x6e757473
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] *pdpt = 000000002fb8b001 *pde = 0000000000000000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Oops: 0010 [#6] PREEMPT
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>> snd_seq_midi_eve
>> n
>> t tveeprom videobuf_dma_sg
>> Dec 29 15:58:31 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Pid: 11926, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: 0060:[<6e757474>] EFLAGS: 00210206 CPU: 0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP is at 0x6e757474
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EAX: 726f6863 EBX: c538c000 ECX: 00000000 EDX: 00001c08
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] ESI: 000251ac EDI: fb55c1a8 EBP: c8497ea8 ESP: c8497e74
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR0: 8005003b CR2: 6e757474 CR3: 34276000 CR4: 000007f0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR6: ffff0ff0 DR7: 00000400
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Process mplayer (pid: 11926, ti=c8496000 task=f48c8000 task.ti=c8496000)
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Stack:
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa18a556 ffffffbe c117e3f6 00000060 00210246 002a8464 f7138064 fb537000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  002a8440 c117e811 f5920988 fb537000 c538c000 c8497ed8 fa18564d c8497ed8
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa182597 f595a000 f595a22c c8497ed8 fa182977 002a8464 f5920900 f595a000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Call Trace:
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18a556>] ? crystalhd_link_download_fw+0x176/0x300 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e3f6>] ? __copy_from_user_ll+0xd6/0xf0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18564d>] bc_cproc_download_fw+0xed/0x150 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182597>] ? chd_dec_proc_user_data+0x237/0x320 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa185560>] ? bc_proc_in_completion+0x70/0x70 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c136c865>] ? _raw_spin_lock+0x65/0x70
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c109c156>] ? handle_fasteoi_irq+0xb6/0xd0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ad1>] ? fget_light+0x101/0x120
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4a30>] ? fget_light+0x60/0x120
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c137238c>] sysenter_do_call+0x12/0x32
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Code:  Bad EIP value.
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: [<6e757474>] 0x6e757474 SS:ESP 0068:c8497e74
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR2: 000000006e757474
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.538480] ---[ end trace f5ae98f349325072 ]---
>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629049] crystalhd 0000:02:00.0: F/w Signature mismatch
>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629065] crystalhd 0000:02:00.0: Firmware Download Failure!! - 21
>> Dec 29 15:58:33 vdr1 kernel: [ 5701.754795] crystalhd 0000:02:00.0: Closing user[0] handle via ioctl with mode 1417200
>>
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.281871] BUG: unable to handle kernel paging request at 6e757474
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] IP: [<6e757474>] 0x6e757473
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] *pdpt = 000000002fb8b001 *pde = 0000000000000000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Oops: 0010 [#6] PREEMPT
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>> snd_seq_midi_eve
>> n
>> t tveeprom videobuf_dma_sg
>> Dec 29 15:58:31 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Pid: 11926, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: 0060:[<6e757474>] EFLAGS: 00210206 CPU: 0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP is at 0x6e757474
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EAX: 726f6863 EBX: c538c000 ECX: 00000000 EDX: 00001c08
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] ESI: 000251ac EDI: fb55c1a8 EBP: c8497ea8 ESP: c8497e74
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR0: 8005003b CR2: 6e757474 CR3: 34276000 CR4: 000007f0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR6: ffff0ff0 DR7: 00000400
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Process mplayer (pid: 11926, ti=c8496000 task=f48c8000 task.ti=c8496000)
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Stack:
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa18a556 ffffffbe c117e3f6 00000060 00210246 002a8464 f7138064 fb537000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  002a8440 c117e811 f5920988 fb537000 c538c000 c8497ed8 fa18564d c8497ed8
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa182597 f595a000 f595a22c c8497ed8 fa182977 002a8464 f5920900 f595a000
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Call Trace:
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18a556>] ? crystalhd_link_download_fw+0x176/0x300 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e3f6>] ? __copy_from_user_ll+0xd6/0xf0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18564d>] bc_cproc_download_fw+0xed/0x150 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182597>] ? chd_dec_proc_user_data+0x237/0x320 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa185560>] ? bc_proc_in_completion+0x70/0x70 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c136c865>] ? _raw_spin_lock+0x65/0x70
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c109c156>] ? handle_fasteoi_irq+0xb6/0xd0
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ad1>] ? fget_light+0x101/0x120
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4a30>] ? fget_light+0x60/0x120
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c137238c>] sysenter_do_call+0x12/0x32
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Code:  Bad EIP value.
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: [<6e757474>] 0x6e757474 SS:ESP 0068:c8497e74
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR2: 000000006e757474
>> Dec 29 15:58:31 vdr1 kernel: [ 5699.538480] ---[ end trace f5ae98f349325072 ]---
>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629049] crystalhd 0000:02:00.0: F/w Signature mismatch
>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629065] crystalhd 0000:02:00.0: Firmware Download Failure!! - 21
>> Dec 29 15:58:33 vdr1 kernel: [ 5701.754795] crystalhd 0000:02:00.0: Closing user[0] handle via ioctl with mode 1417200
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-media" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [BUG] crystalhd git.linuxtv.org kernel driver: No more Oops or kernel crashes with Linux 3.2
  2013-01-05 12:44   ` thomas schorpp
@ 2013-01-07 23:33     ` thomas schorpp
  2013-01-11  0:43       ` [BUG] crystalhd git.linuxtv.org kernel driver: Crashing again Linux, 3.2, using mozilla flashplugin from adobe thomas schorpp
  0 siblings, 1 reply; 11+ messages in thread
From: thomas schorpp @ 2013-01-07 23:33 UTC (permalink / raw)
  To: linux-media; +Cc: Oliver Schinagl, j, jarod, kkahn

Hi People,

-topic-

be careful using the bleeding edge "stable" kernel series > 3.2 with this driver.

y
tom


On 05.01.2013 13:44, thomas schorpp wrote:
> -Removed Broadcom kernel module authors prasadb@broadcom.com, nsankar@broadcom.com from CC list, unreachable, see att. Trying listed official Press contact instead-
>
> Hi Oliver,  hi crystalhd users and devs,  hello Broadcom Crystal HD staff,
>
> 1.
> sorry for the delay, I had to upgrade my old debian i386 stable...squeeze-backports userspace on the old core2duo machine to amd64 by full reinstall, otherwise the driver interface of libcrystalhd3 i686 to 3.6.10...3.7.1amd64 SMP kernel.org kernels has failed permanently,
>
> please (anyone still running such a setup or You) try to confirm this and report to this thread.
>
> lspci still shows the same PCI-E errors (see my other posts to this list) with the working libcrystalhd3 amd64 and broadcom designed crystalhd driver now, so
> this data reported from the chipset or lspci has to be considered faulty or stale and irelevant now, I will build the latest lspci from source to crosscheck this.
>
>
> Please build ffmpeg rel. 1.0.1(non-MT version, not later version, git master showed up with an audio format bug, presenting wrong audio sample format as planar (sfltp, fltp, s16p) which bino cannot handle and makes mplayer cry for not having libavresample access but which is disabled by default in ffmpeg configure defaults and debian dmo source packages )
> from Your distro source package with --disable-decoders='h264, h264_vdpau, h264_vda' and leave only h264_crystalhd need as h.264 decoder
>
> and so trigger crystalhd by every app on your system accessing h.264 content for parsing or decoding and linked to libavcodec (check binaries with ldd if linked against this libavcodec54, , in libavcodec53 h264_crystalhd is flagged CAP_EXPERIMENTAL, which makes it unaccesible by other apps than the ffmpeg program (-strict -2), mplayer: -vc ffh264crystalhd, or will fail --disable-decoders='h264, h264_vdpau, h264_vda')  like mplayer (not statically linked), kaffeine, vlc, gnome nautilus media file properties (uses mplayer -identify) sequentially called and then in parallel and record and post the Ooopses in this thread here until the authors return from winter sports ;-)
> Note for Bino users: System requirement is at least debian squeeze-backports X and DRI, otherwise bino will segfault the dri driver, i965 here and you need to build libGLEW(mx) 1.6 from source for debian stable systems, see http://savannah.nongnu.org/bugs/?33368 http://bino3d.org/help-wanted.html
>
> 2.
> With the new amd64 userspace on 3.7.1 SMP PREEMPT kernel things got even more worse here now, got 5 kernel panics in IRQ handler of the crystalhd driver in 1h while watching h.264 with
> mplayer2/1 (single threaded decoding mode, stereo3d filter) resulting in system halting kernel crashes, I need to setup serial console debugging to get the logs, on my Pentium M i686 vdr machine, kernel has been able to continue at least after the null pointer oopses.
> We need to have confirmation for this, too.
>
> 3.
> Since the source code still states broadcom staff as module authors and the download on the broadcom website is packaged broken tar.bz2 and does not build here with recent kernels,
> I'm CC'ing them now, too, and because it's their basic driver skeleton design and the quality and performance of this driver is far below the windows driver, which performs h.264 1080 great with http://mpc-hc.sourceforge.net at 5-10% cpu usage even on xp x64 on a i965, this should be the reference development target.
>
> 4.
> The driver Makefile won't compile it with debian squeeze-backports 3.2 and 3.2 bpo kbuild infrastructure, missing helper scripts and includes, it needs a full ready build kernel from sources:
>
> schorpp@tom3:/usr/local/src/crystalhd/driver/linux$ LC_ALL=C make
> make -C /lib/modules/3.2.0-0.bpo.4-amd64/build SUBDIRS=/mnt/data/usr/local/src/crystalhd/driver/linux modules
> make[1]: Entering directory `/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-amd64'
> /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/Makefile:287: /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/scripts/Kbuild.include: Datei oder Verzeichnis nicht gefunden
> /bin/bash: /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/scripts/gcc-x86_64-has-stack-protector.sh: Datei oder Verzeichnis nicht gefunden
> /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/arch/x86/Makefile:81: stack protector enabled but no compiler support
> /bin/bash: /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/scripts/gcc-goto.sh: Datei oder Verzeichnis nicht gefunden
> make: *** Leerer Variablenname.  Schluss.
> make[3]: *** [_module_/mnt/data/usr/local/src/crystalhd/driver/linux] Fehler 2
> make[2]: *** [sub-make] Error 2
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-amd64'
> make: *** [all] Error 2
> schorpp@tom3:/usr/local/src/crystalhd/driver/linux$
>
> 5.
> I'm focusing to the 3.x kernel source code delivered staging driver now (only BCM70012 support so far, no BCM70015) meanwhile unitil we get more information.
>
> 6.
> Mythtv and xbmc people please join and report, too.
>
> You can get a BCM70012 for just 10US$, a BCM700015 from 30US$ up on Ebay from china, mini-PCI-E to PCI-E adapter cards for not much more, I think it's worth playing ;-)
>
> y
> tom
>
> Att: Oopscrash in IRQ- handler:
>
> Jan  4 20:43:38 tom3 kernel: [  779.388263] crystalhd 0000:03:00.0: list_index:1 rx[23] rxtot[2031] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
> Jan  4 20:43:38 tom3 kernel: [  779.435169] crystalhd 0000:03:00.0: list_index:1 rx[24] rxtot[2033] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
> Jan  4 20:43:38 tom3 kernel: [  779.479479] crystalhd 0000:03:00.0: list_index:1 rx[25] rxtot[2035] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
> Jan  4 20:43:38 tom3 kernel: [  779.569384] crystalhd 0000:03:00.0: MISSING 2 PICTURES
> Jan  4 20:43:38 tom3 kernel: [  779.614878] crystalhd 0000:03:00.0: MISSING 3 PICTURES
> Jan  4 20:43:38 tom3 kernel: [  779.662146] crystalhd 0000:03:00.0: MISSING 2 PICTURES
> Jan  4 20:43:38 tom3 kernel: [  779.828924] crystalhd 0000:03:00.0: list_index:1 rx[26] rxtot[2057] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
> Jan  4 20:43:38 tom3 kernel: [  779.890531] BUG: unable to handle kernel NULL pointer dereference at 000000000000002c
> Jan  4 20:43:38 tom3 kernel: [  779.890668] IP: [<ffffffffa03ce0a0>] crystalhd_dioq_fetch_wait+0x210/0x3e0 [crystalhd]
> Jan  4 20:43:38 tom3 kernel: [  779.890800] PGD 1573f067 PUD 4a2bf067 PMD 0
> Jan  4 20:43:38 tom3 kernel: [  779.890888] Oops: 0000 [#1] PREEMPT SMP
> Jan  4 20:43:38 tom3 kernel: [  779.890974] Modules linked in: nfsv4 nfs fscache uinput parport_pc ppdev lp parport bridge stp llc bnep rfcomm bluetooth nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs cpufreq_powersave cpufreq_stats cpufreq_conservative cpufreq_performance cpufreq_ondemand fuse dm_mod ext3 jbd pciehp arc4 ath5k ath mac80211 snd_hda_codec_analog cfg80211 snd_hda_intel snd_usb_audio snd_hda_codec snd_hwdep snd_pcm_oss thinkpad_acpi snd_mixer_oss rfkill snd_usbmidi_lib snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer pcmcia snd_seq_device psmouse snd yenta_socket tpm_tis pcmcia_rsrc acpi_cpufreq tpm pcmcia_core crystalhd(O) coretemp pcspkr soundcore i2c_i801 serio_raw led_class snd_page_alloc freq_table tpm_bios battery ac nvram rtc_cmos hid_generic wmi mperf evdev processor nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit xt_tcpudp
> iptable_filter ip_t
>
> ables x_tables usb_storage
> Jan  4 20:43:38 tom3 kernel: ext4 mbcache jbd2 crc16 usbhid hid sg sd_mod crc_t10dif ata_generic uhci_hcd ahci libahci ata_piix atkbd libata xhci_hcd thermal ehci_hcd usbcore e1000e usb_common
> Jan  4 20:43:38 tom3 kernel: [  779.891477] CPU 0
> Jan  4 20:43:38 tom3 kernel: [  779.891477] Pid: 6837, comm: mplayer2 Tainted: G           O 3.7.1 #10 LENOVO 7735Y1T/7735Y1T
> Jan  4 20:43:38 tom3 kernel: [  779.891477] RIP: 0010:[<ffffffffa03ce0a0>]  [<ffffffffa03ce0a0>] crystalhd_dioq_fetch_wait+0x210/0x3e0 [crystalhd]
> Jan  4 20:43:38 tom3 kernel: [  779.891477] RSP: 0018:ffff88004a387d28  EFLAGS: 00010246
> Jan  4 20:43:38 tom3 kernel: [  779.891477] RAX: 0000000000000000 RBX: ffff88004a32bf00 RCX: 0000000000000000
> Jan  4 20:43:38 tom3 kernel: [  779.891477] RDX: 0000000000000046 RSI: ffffffffa03cd57b RDI: ffffffff814d6881
> Jan  4 20:43:38 tom3 kernel: [  779.891477] RBP: ffff88004a387dd8 R08: 0000000000000000 R09: 0000000000000001
> Jan  4 20:43:38 tom3 kernel: [  779.891477] R10: 0000000000000000 R11: 0000000000000001 R12: ffff880079e490c0
> Jan  4 20:43:38 tom3 kernel: [  779.891477] R13: 0000000000000000 R14: ffff880079e490e8 R15: ffff88004a32bf00
> Jan  4 20:43:38 tom3 kernel: [  779.891477] FS:  00007fe394b83780(0000) GS:ffff88007f400000(0000) knlGS:0000000000000000
> Jan  4 20:43:38 tom3 kernel: [  779.891477] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> Jan  4 20:43:38 tom3 kernel: [  779.891477] CR2: 000000000000002c CR3: 00000000157f1000 CR4: 00000000000007f0
> Jan  4 20:43:38 tom3 kernel: [  779.891477] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> Jan  4 20:43:38 tom3 kernel: [  779.891477] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> Jan  4 20:43:38 tom3 kernel: [  779.891477] Process mplayer2 (pid: 6837, threadinfo ffff88004a386000, task ffff88004a32bf00)
> Jan  4 20:43:38 tom3 kernel: [  779.891477] Stack:
> Jan  4 20:43:38 tom3 kernel: [  779.891477]  ffff88004a32c5c0 000003448106c4f6 ffff88007aed2a00 ffff88007c162098
> Jan  4 20:43:38 tom3 kernel: [  779.891477]  ffff88004a387df4 ffff8800157529b0 ffff880015752800 ffff88004a32bf00
> Jan  4 20:43:38 tom3 kernel: [  779.891477]  ffff880079e49120 0000000100075a56 0000000000000000 ffff88004a32bf00
> Jan  4 20:43:38 tom3 kernel: [  779.891477] Call Trace:
> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff81079df0>] ? try_to_wake_up+0x230/0x230
> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03cf680>] ? bc_cproc_start_capture+0xf0/0xf0 [crystalhd]
> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03d13de>] crystalhd_hw_get_cap_buffer+0x6e/0x180 [crystalhd]
> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03cf73d>] bc_cproc_fetch_frame+0xbd/0x1b0 [crystalhd]
> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03ccdab>] chd_dec_api_cmd+0xab/0x100 [crystalhd]
> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03ccf42>] chd_dec_ioctl+0x142/0x160 [crystalhd]
> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff81181d6a>] do_vfs_ioctl+0x2da/0x310
> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff8118d8f0>] ? fget_light+0x70/0x160
> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff81181df7>] sys_ioctl+0x57/0x90
> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff8123c79e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff814de802>] system_call_fastpath+0x16/0x1b
> Jan  4 20:43:38 tom3 kernel: [  779.891477] Code: 87 10 e1 45 85 ed 0f 85 4f 01 00 00 48 8b bd 78 ff ff ff e8 a3 e4 c9 e0 85 c0 0f 85 4e 01 00 00 4c 89 e7 e8 b3 f3 ff ff 49 89 c0 <f6> 40 2c 03 0f 85 97 01 00 00 48 8b 4d 80 48 8b 81 d0 00 00 00
> Jan  4 20:43:38 tom3 kernel: [  779.891477] RIP  [<ffffffffa03ce0a0>] crystalhd_dioq_fetch_wait+0x210/0x3e0 [crystalhd]
> Jan  4 20:43:38 tom3 kernel: [  779.891477]  RSP <ffff88004a387d28>
> Jan  4 20:43:38 tom3 kernel: [  779.891477] CR2: 000000000000002c
> Jan  4 20:43:38 tom3 kernel: [  779.912578] delay: estimated 384, actual 0
> Jan  4 20:43:38 tom3 kernel: [  779.912610] delay: estimated 384, actual 48
> Jan  4 20:43:38 tom3 kernel: [  779.914258] ---[ end trace b4d3d5bb1ad97fd7 ]---
> Jan  4 20:46:05 tom3 kernel: [  926.565061] SysRq : Emergency Remount R/O
>
>
> On 03.01.2013 16:17, Oliver Schinagl wrote:
>> I actually am one of the few that has one of those decoders so should be able to test things when needed. Just let me know what to test and I will try to comply
>>
>> On 02-01-13 08:48, thomas schorpp wrote:
>>> Hello guys,
>>>
>>> I'm working on supporting BCM 970012/15 crystalhd decoder in userspace video/tv apps and
>>>
>>> can't find where to report bugs of
>>>
>>> http://git.linuxtv.org/jarod/crystalhd.git
>>> <devinheitmueller> I think he just borrowed our git server.
>>>
>>> So I borrow this list to get more developers, testers and sw- quality guys in.
>>>
>>> Forgot to mention the attached Oopses under high load and "multithreading" in half automated stress/mass testing.
>>>
>>> Scenario e.g.:
>>> Dec 29 15:58:29 vdr1 kernel: [ 5698.364950] crystalhd 0000:02:00.0: Opening new user[0] handle
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.557932] crystalhd 0000:02:00.0: Opening new user[0] handle
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.846312] crystalhd 0000:02:00.0: Close the handle first..
>>>
>>> Looks like the driver is not "threadsave", rebuilding kernel with spinlock debugging, should show more up.
>>>
>>> y
>>> tom
>>>
>>> -Att: Kernel OOPS bt, etc
>>>
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568671] BUG: unable to handle kernel paging request at 2062696c
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568678] IP: [<2062696c>] 0x2062696b
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568681] *pdpt = 0000000008497001 *pde = 0000000000000000
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568684] Oops: 0010 [#4] PREEMPT
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568731] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>>> snd_seq_midi_eve
>>> n
>>> t tveeprom videobuf_dma_sg
>>> Dec 29 15:56:10 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568770] Pid: 11841, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568772] EIP: 0060:[<2062696c>] EFLAGS: 00010286 CPU: 0
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568775] EIP is at 0x2062696c
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568777] EAX: 00370042 EBX: c843c000 ECX: 636e3800 EDX: 00001c10
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568778] ESI: 000238fc EDI: fb0068fc EBP: c842dea8 ESP: c842de74
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568780]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568781] CR0: 8005003b CR2: 2062696c CR3: 084d9000 CR4: 000007f0
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568783] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568784] DR6: ffff0ff0 DR7: 00000400
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568786] Process mplayer (pid: 11841, ti=c842c000 task=f0aba940 task.ti=c842c000)
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568787] Stack:
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568793]  fa18a569 ffffff10 c117e3f6 00000060 00010246 002a8464 f7138064 fafe3000
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568798]  002a8440 c117e811 f5920988 fafe3000 c843c000 c842ded8 fa18564d c842ded8
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568803]  fa182597 f595a400 f595a62c c842ded8 fa182977 002a8464 f5920900 f595a400
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568804] Call Trace:
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568818]  [<fa18a569>] ? crystalhd_link_download_fw+0x189/0x300 [crystalhd]
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568823]  [<c117e3f6>] ? __copy_from_user_ll+0xd6/0xf0
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568828]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568839]  [<fa18564d>] bc_cproc_download_fw+0xed/0x150 [crystalhd]
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568846]  [<fa182597>] ? chd_dec_proc_user_data+0x237/0x320 [crystalhd]
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568854]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568861]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568870]  [<fa185560>] ? bc_proc_in_completion+0x70/0x70 [crystalhd]
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568877]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568881]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568886]  [<c10685ef>] ? ktime_get+0x6f/0xf0
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568891]  [<c101ca56>] ? lapic_next_event+0x16/0x20
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568895]  [<c106f287>] ? clockevents_program_event+0xe7/0x130
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568898]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568901]  [<c10e4ad1>] ? fget_light+0x101/0x120
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568904]  [<c10e4a30>] ? fget_light+0x60/0x120
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568906]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568910]  [<c137238c>] sysenter_do_call+0x12/0x32
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568914]  [<c1360000>] ? asus_hides_smbus_hostbridge+0x264/0x269
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568917] Code:  Bad EIP value.
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568922] EIP: [<2062696c>] 0x2062696c SS:ESP 0068:c842de74
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568923] CR2: 000000002062696c
>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568926] ---[ end trace f5ae98f349325070 ]---
>>>
>>> Dec 29 15:58:29 vdr1 kernel: [ 5698.364950] crystalhd 0000:02:00.0: Opening new user[0] handle
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.557932] crystalhd 0000:02:00.0: Opening new user[0] handle
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.846312] crystalhd 0000:02:00.0: Close the handle first..
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.858268] crystalhd 0000:02:00.0: Closing user[0] handle via ioctl with mode 1417200
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.961171] crystalhd_hw_stats: Invalid Arguments
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.961204] BUG: unable to handle kernel NULL pointer dereference at 00000040
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] IP: [<c11848d8>] do_raw_spin_trylock+0x8/0x50
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] *pdpt = 0000000030a1d001 *pde = 0000000000000000
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Oops: 0000 [#5] PREEMPT
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>>> snd_seq_midi_eve
>>> n
>>> t tveeprom videobuf_dma_sg
>>> Dec 29 15:58:30 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Pid: 11927, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP: 0060:[<c11848d8>] EFLAGS: 00210046 CPU: 0
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP is at do_raw_spin_trylock+0x8/0x50
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EAX: 00000040 EBX: 00000000 ECX: 00000040 EDX: 00000000
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] ESI: 00000040 EDI: 00200292 EBP: c85a7e5c ESP: c85a7e58
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] CR0: 8005003b CR2: 00000040 CR3: 34276000 CR4: 000007f0
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] DR6: ffff0ff0 DR7: 00000400
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Process mplayer (pid: 11927, ti=c85a6000 task=f48ce720 task.ti=c85a6000)
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Stack:
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  00000050 c85a7e80 c136c9b5 00000000 00000002 00000000 fa184bd6 f5955c00
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  f5920988 00000000 c85a7ed8 fa184bd6 00000218 c85a6000 00000000 c85a7eb0
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  c117e811 09ce6618 0c955c00 f5955c00 00000000 09ce6618 c85a7ed8 fa1823b9
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Call Trace:
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c136c9b5>] _raw_spin_lock_irqsave+0x55/0x90
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa184bd6>] ? bc_cproc_get_stats+0x226/0x280 [crystalhd]
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa184bd6>] bc_cproc_get_stats+0x226/0x280 [crystalhd]
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1823b9>] ? chd_dec_proc_user_data+0x59/0x320 [crystalhd]
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1849b0>] ? bc_cproc_reset_stats+0x20/0x20 [crystalhd]
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c104e73e>] ? hrtimer_nanosleep+0x6e/0xf0
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4ad1>] ? fget_light+0x101/0x120
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4a30>] ? fget_light+0x60/0x120
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c137238c>] sysenter_do_call+0x12/0x32
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Code: a2 66 90 c7 43 08 00 00 00 00 8b 75 f8 8b 7d fc a1 2c dc 4e c1 89 43 0c 8b 5d f4 89 ec 5d c3 8d 74 26 00 55 89 c1 89 e5 53 31 db <8b> 00 c7 01 00 00 00 00 84 c0 0f 9f c3 85 db 74 17 a1 2c dc 4e
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP: [<c11848d8>] do_raw_spin_trylock+0x8/0x50 SS:ESP 0068:c85a7e58
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] CR2: 0000000000000040
>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] ---[ end trace f5ae98f349325071 ]---
>>> Dec 29 15:58:30 vdr1 kernel: [ 5699.232992] note: mplayer[11927] exited with preempt_count 1
>>> Dec 29 15:58:30 vdr1 kernel: [ 5699.251706] crystalhd 0000:02:00.0: Opening new user[0] handle
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.281871] BUG: unable to handle kernel paging request at 6e757474
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] IP: [<6e757474>] 0x6e757473
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] *pdpt = 000000002fb8b001 *pde = 0000000000000000
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Oops: 0010 [#6] PREEMPT
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>>> snd_seq_midi_eve
>>> n
>>> t tveeprom videobuf_dma_sg
>>> Dec 29 15:58:31 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Pid: 11926, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: 0060:[<6e757474>] EFLAGS: 00210206 CPU: 0
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP is at 0x6e757474
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EAX: 726f6863 EBX: c538c000 ECX: 00000000 EDX: 00001c08
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] ESI: 000251ac EDI: fb55c1a8 EBP: c8497ea8 ESP: c8497e74
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR0: 8005003b CR2: 6e757474 CR3: 34276000 CR4: 000007f0
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR6: ffff0ff0 DR7: 00000400
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Process mplayer (pid: 11926, ti=c8496000 task=f48c8000 task.ti=c8496000)
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Stack:
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa18a556 ffffffbe c117e3f6 00000060 00210246 002a8464 f7138064 fb537000
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  002a8440 c117e811 f5920988 fb537000 c538c000 c8497ed8 fa18564d c8497ed8
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa182597 f595a000 f595a22c c8497ed8 fa182977 002a8464 f5920900 f595a000
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Call Trace:
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18a556>] ? crystalhd_link_download_fw+0x176/0x300 [crystalhd]
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e3f6>] ? __copy_from_user_ll+0xd6/0xf0
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18564d>] bc_cproc_download_fw+0xed/0x150 [crystalhd]
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182597>] ? chd_dec_proc_user_data+0x237/0x320 [crystalhd]
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa185560>] ? bc_proc_in_completion+0x70/0x70 [crystalhd]
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c136c865>] ? _raw_spin_lock+0x65/0x70
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c109c156>] ? handle_fasteoi_irq+0xb6/0xd0
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ad1>] ? fget_light+0x101/0x120
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4a30>] ? fget_light+0x60/0x120
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c137238c>] sysenter_do_call+0x12/0x32
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Code:  Bad EIP value.
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: [<6e757474>] 0x6e757474 SS:ESP 0068:c8497e74
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR2: 000000006e757474
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.538480] ---[ end trace f5ae98f349325072 ]---
>>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629049] crystalhd 0000:02:00.0: F/w Signature mismatch
>>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629065] crystalhd 0000:02:00.0: Firmware Download Failure!! - 21
>>> Dec 29 15:58:33 vdr1 kernel: [ 5701.754795] crystalhd 0000:02:00.0: Closing user[0] handle via ioctl with mode 1417200
>>>
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.281871] BUG: unable to handle kernel paging request at 6e757474
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] IP: [<6e757474>] 0x6e757473
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] *pdpt = 000000002fb8b001 *pde = 0000000000000000
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Oops: 0010 [#6] PREEMPT
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>>> snd_seq_midi_eve
>>> n
>>> t tveeprom videobuf_dma_sg
>>> Dec 29 15:58:31 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Pid: 11926, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: 0060:[<6e757474>] EFLAGS: 00210206 CPU: 0
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP is at 0x6e757474
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EAX: 726f6863 EBX: c538c000 ECX: 00000000 EDX: 00001c08
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] ESI: 000251ac EDI: fb55c1a8 EBP: c8497ea8 ESP: c8497e74
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR0: 8005003b CR2: 6e757474 CR3: 34276000 CR4: 000007f0
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR6: ffff0ff0 DR7: 00000400
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Process mplayer (pid: 11926, ti=c8496000 task=f48c8000 task.ti=c8496000)
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Stack:
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa18a556 ffffffbe c117e3f6 00000060 00210246 002a8464 f7138064 fb537000
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  002a8440 c117e811 f5920988 fb537000 c538c000 c8497ed8 fa18564d c8497ed8
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa182597 f595a000 f595a22c c8497ed8 fa182977 002a8464 f5920900 f595a000
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Call Trace:
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18a556>] ? crystalhd_link_download_fw+0x176/0x300 [crystalhd]
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e3f6>] ? __copy_from_user_ll+0xd6/0xf0
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18564d>] bc_cproc_download_fw+0xed/0x150 [crystalhd]
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182597>] ? chd_dec_proc_user_data+0x237/0x320 [crystalhd]
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa185560>] ? bc_proc_in_completion+0x70/0x70 [crystalhd]
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c136c865>] ? _raw_spin_lock+0x65/0x70
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c109c156>] ? handle_fasteoi_irq+0xb6/0xd0
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ad1>] ? fget_light+0x101/0x120
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4a30>] ? fget_light+0x60/0x120
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c137238c>] sysenter_do_call+0x12/0x32
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Code:  Bad EIP value.
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: [<6e757474>] 0x6e757474 SS:ESP 0068:c8497e74
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR2: 000000006e757474
>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.538480] ---[ end trace f5ae98f349325072 ]---
>>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629049] crystalhd 0000:02:00.0: F/w Signature mismatch
>>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629065] crystalhd 0000:02:00.0: Firmware Download Failure!! - 21
>>> Dec 29 15:58:33 vdr1 kernel: [ 5701.754795] crystalhd 0000:02:00.0: Closing user[0] handle via ioctl with mode 1417200
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-media" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>>
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [BUG] crystalhd git.linuxtv.org kernel driver: Crashing again Linux, 3.2, using mozilla flashplugin from adobe
  2013-01-07 23:33     ` [BUG] crystalhd git.linuxtv.org kernel driver: No more Oops or kernel crashes with Linux 3.2 thomas schorpp
@ 2013-01-11  0:43       ` thomas schorpp
  2013-01-25 21:38         ` [PATCH] crystalhd git.linuxtv.org kernel driver: FIX null pointer BUG in crystalhd_dioq_fetch_wait() on queue(s) overload thomas schorpp
                           ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: thomas schorpp @ 2013-01-11  0:43 UTC (permalink / raw)
  Cc: linux-media, Oliver Schinagl, j, jarod, kkahn

Linux 3.6. was not the cause, it's crashing kernel again:

Jan 11 01:37:10 tom3 kernel: [121968.394453] crystalhd 0000:03:00.0: Opening new user[0] handle
Jan 11 01:37:13 tom3 kernel: [121971.186506] start_capture: pause_th:12, resume_th:5
Jan 11 01:37:13 tom3 kernel: [121971.273696] crystalhd 0000:03:00.0: [FMT CH] PIB:0 1 420 2 500 1e0 354 0 0 0
Jan 11 01:37:13 tom3 kernel: [121971.675398] crystalhd 0000:03:00.0: MISSING 11 PICTURES
Jan 11 01:37:13 tom3 pulseaudio[6153]: ratelimit.c: 63 events suppressed
Jan 11 01:37:24 tom3 kernel: [121982.877752] crystalhd 0000:03:00.0: FETCH TIMEOUT
Jan 11 01:37:31 tom3 pulseaudio[6153]: ratelimit.c: 258 events suppressed
Jan 11 01:37:36 tom3 kernel: [121994.735956] crystalhd 0000:03:00.0: FETCH TIMEOUT
Jan 11 01:37:47 tom3 kernel: [122005.765819] BUG: unable to handle kernel NULL pointer dereference at 000000000000002c
Jan 11 01:37:47 tom3 kernel: [122005.765964] IP: [<ffffffffa046214c>] crystalhd_dioq_fetch_wait+0x25c/0x410 [crystalhd]
Jan 11 01:37:47 tom3 kernel: [122005.766014] PGD 0
Jan 11 01:37:47 tom3 kernel: [122005.766014] Oops: 0000 [#1] PREEMPT SMP

Message from syslogd@tom3 at Jan 11 01:37:47 ...
  kernel:[122005.766014] Oops: 0000 [#1] PREEMPT SMP
Jan 11 01:37:47 tom3 kernel: [122005.766014] CPU 1
Jan 11 01:37:47 tom3 kernel: [122005.766014] Modules linked in: nfs fscache uinput parport_pc ppdev lp parport bluetooth nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs acpi_cpufreq mperf cpufreq_powersave cpufreq_stats cpufreq_conservative cpufreq_performance cpufreq_ondemand freq_table fuse dm_mod ext3 jbd pciehp arc4 ath5k ath mac80211 snd_hda_codec_analog cfg80211 snd_hda_intel snd_hda_codec snd_usb_audio snd_pcm_oss snd_mixer_oss thinkpad_acpi snd_pcm snd_hwdep snd_usbmidi_lib snd_seq_dummy rfkill snd_seq_oss snd_seq_midi pcmcia snd_rawmidi snd_seq_midi_event snd_seq snd_timer yenta_socket psmouse snd_seq_device pcspkr pcmcia_rsrc usb_storage pcmcia_core serio_raw crystalhd(O) snd i2c_i801 tpm_tis snd_page_alloc soundcore tpm rtc_cmos wmi nvram tpm_bios battery ac evdev processor nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit xt_tcpudp iptable_filter ip_tables x_tables ext4 mbcache jbd2 crc16 usbhid hid s
g sd_mod crc_t10dif ata_ge
Jan 11 01:37:47 tom3 kernel: neric uhci_hcd ata_piix ahci libahci libata atkbd xhci_hcd ehci_hcd thermal e1000e usbcore usb_common [last unloaded: scsi_wait_scan]
Jan 11 01:37:47 tom3 kernel: [122005.766014]
Jan 11 01:37:47 tom3 kernel: [122005.766014] Pid: 22091, comm: plugin-containe Tainted: G           O 3.2.36-dirty #4 LENOVO 7735Y1T/7735Y1T
Jan 11 01:37:47 tom3 kernel: [122005.766014] RIP: 0010:[<ffffffffa046214c>]  [<ffffffffa046214c>] crystalhd_dioq_fetch_wait+0x25c/0x410 [crystalhd]
Jan 11 01:37:47 tom3 kernel: [122005.766014] RSP: 0018:ffff880005ed3d48  EFLAGS: 00010246
Jan 11 01:37:47 tom3 kernel: [122005.766014] RAX: 0000000000000000 RBX: ffff880030785e50 RCX: 0000000000000000
Jan 11 01:37:47 tom3 kernel: [122005.766014] RDX: 0000000000000046 RSI: ffffffffa04615c3 RDI: ffffffff81493e82
Jan 11 01:37:47 tom3 kernel: [122005.766014] RBP: ffff880005ed3df8 R08: 0000000000000000 R09: 0000000000000000
Jan 11 01:37:47 tom3 kernel: [122005.766014] R10: 0000000000000000 R11: ffff880030786510 R12: ffff8800075a2c00
Jan 11 01:37:47 tom3 kernel: [122005.766014] R13: 0000000000000000 R14: ffff8800075a2c28 R15: ffff880030785e50
Jan 11 01:37:47 tom3 kernel: [122005.766014] FS:  00007f2fa71fe700(0000) GS:ffff88007f500000(0000) knlGS:0000000000000000
Jan 11 01:37:47 tom3 kernel: [122005.766014] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Jan 11 01:37:47 tom3 kernel: [122005.766014] CR2: 000000000000002c CR3: 0000000063969000 CR4: 00000000000006e0
Jan 11 01:37:47 tom3 kernel: [122005.766014] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Jan 11 01:37:47 tom3 kernel: [122005.766014] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Jan 11 01:37:47 tom3 kernel: [122005.766014] Process plugin-containe (pid: 22091, threadinfo ffff880005ed2000, task ffff880030785e50)
Jan 11 01:37:47 tom3 kernel: [122005.766014] Stack:

Message from syslogd@tom3 at Jan 11 01:37:47 ...
  kernel:[122005.766014] Stack:
Jan 11 01:37:47 tom3 kernel: [122005.766014]  0000000000000327 ffff880030786510 ffff880011f5b100 ffff88007c20e090
Jan 11 01:37:47 tom3 kernel: [122005.766014]  ffff880005ed3e14 ffff880005bde1b0 ffff880005bde000 ffff880030785e50
Jan 11 01:37:47 tom3 kernel: [122005.766014]  ffff8800075a2c60 00000001074119c6 0000000000000000 ffff880030785e50
Jan 11 01:37:47 tom3 kernel: [122005.766014] Call Trace:

Message from syslogd@tom3 at Jan 11 01:37:47 ...
  kernel:[122005.766014] Call Trace:
Jan 11 01:37:47 tom3 kernel: [122005.766014]  [<ffffffff810497e0>] ? try_to_wake_up+0x260/0x260
Jan 11 01:37:47 tom3 kernel: [122005.766014]  [<ffffffffa04637b0>] ? bc_cproc_start_capture+0x100/0x100 [crystalhd]
Jan 11 01:37:47 tom3 kernel: [122005.766014]  [<ffffffffa0465566>] crystalhd_hw_get_cap_buffer+0x56/0x1a0 [crystalhd]
Jan 11 01:37:47 tom3 kernel: [122005.766014]  [<ffffffffa046383d>] bc_cproc_fetch_frame+0x8d/0x1b0 [crystalhd]
Jan 11 01:37:47 tom3 kernel: [122005.766014]  [<ffffffffa0460db1>] chd_dec_api_cmd+0x81/0x100 [crystalhd]
Jan 11 01:37:47 tom3 kernel: [122005.766014]  [<ffffffffa0460ec0>] chd_dec_ioctl+0x90/0x170 [crystalhd]
Jan 11 01:37:47 tom3 kernel: [122005.766014]  [<ffffffff811704bc>] do_vfs_ioctl+0x9c/0x330
Jan 11 01:37:47 tom3 kernel: [122005.766014]  [<ffffffff8115ebb0>] ? fget_light+0x40/0x140
Jan 11 01:37:47 tom3 kernel: [122005.766014]  [<ffffffff8108d9bd>] ? trace_hardirqs_on_caller+0x11d/0x1b0
Jan 11 01:37:47 tom3 kernel: [122005.766014]  [<ffffffff8117079f>] sys_ioctl+0x4f/0x80
Jan 11 01:37:47 tom3 kernel: [122005.766014]  [<ffffffff8149b6eb>] system_call_fastpath+0x16/0x1b
Jan 11 01:37:47 tom3 kernel: [122005.766014] Code: 89 f7 e8 18 1d 03 e1 45 85 ed 75 81 48 8b bd 78 ff ff ff e8 77 97 c1 e0 85 c0 0f 85 c7 00 00 00 4c 89 e7 e8 57 f3 ff ff 49 89 c0 <f6> 40 2c 03 0f 85 3d 01 00 00 48 8b 4d 80 48 8b 81 d0 00 00 00

Message from syslogd@tom3 at Jan 11 01:37:47 ...
  kernel:[122005.766014] Code: 89 f7 e8 18 1d 03 e1 45 85 ed 75 81 48 8b bd 78 ff ff ff e8 77 97 c1 e0 85 c0 0f 85 c7 00 00 00 4c 89 e7 e8 57 f3 ff ff 49 89 c0 <f6> 40 2c 03 0f 85 3d 01 00 00 48 8b 4d 80 48 8b 81 d0 00 00 00
Jan 11 01:37:47 tom3 kernel: [122005.766014] RIP  [<ffffffffa046214c>] crystalhd_dioq_fetch_wait+0x25c/0x410 [crystalhd]
Jan 11 01:37:47 tom3 kernel: [122005.766014]  RSP <ffff880005ed3d48>
Jan 11 01:37:47 tom3 kernel: [122005.766014] CR2: 000000000000002c

Message from syslogd@tom3 at Jan 11 01:37:47 ...
  kernel:[122005.766014] CR2: 000000000000002c
Jan 11 01:37:47 tom3 kernel: [122005.794469] ---[ end trace 09ed3619a23bee55 ]---



On 08.01.2013 00:33, thomas schorpp wrote:
> Hi People,
>
> -topic-
>
> be careful using the bleeding edge "stable" kernel series > 3.2 with this driver.
>
> y
> tom
>
>
> On 05.01.2013 13:44, thomas schorpp wrote:
>> -Removed Broadcom kernel module authors prasadb@broadcom.com, nsankar@broadcom.com from CC list, unreachable, see att. Trying listed official Press contact instead-
>>
>> Hi Oliver,  hi crystalhd users and devs,  hello Broadcom Crystal HD staff,
>>
>> 1.
>> sorry for the delay, I had to upgrade my old debian i386 stable...squeeze-backports userspace on the old core2duo machine to amd64 by full reinstall, otherwise the driver interface of libcrystalhd3 i686 to 3.6.10...3.7.1amd64 SMP kernel.org kernels has failed permanently,
>>
>> please (anyone still running such a setup or You) try to confirm this and report to this thread.
>>
>> lspci still shows the same PCI-E errors (see my other posts to this list) with the working libcrystalhd3 amd64 and broadcom designed crystalhd driver now, so
>> this data reported from the chipset or lspci has to be considered faulty or stale and irelevant now, I will build the latest lspci from source to crosscheck this.
>>
>>
>> Please build ffmpeg rel. 1.0.1(non-MT version, not later version, git master showed up with an audio format bug, presenting wrong audio sample format as planar (sfltp, fltp, s16p) which bino cannot handle and makes mplayer cry for not having libavresample access but which is disabled by default in ffmpeg configure defaults and debian dmo source packages )
>> from Your distro source package with --disable-decoders='h264, h264_vdpau, h264_vda' and leave only h264_crystalhd need as h.264 decoder
>>
>> and so trigger crystalhd by every app on your system accessing h.264 content for parsing or decoding and linked to libavcodec (check binaries with ldd if linked against this libavcodec54, , in libavcodec53 h264_crystalhd is flagged CAP_EXPERIMENTAL, which makes it unaccesible by other apps than the ffmpeg program (-strict -2), mplayer: -vc ffh264crystalhd, or will fail --disable-decoders='h264, h264_vdpau, h264_vda')  like mplayer (not statically linked), kaffeine, vlc, gnome nautilus media file properties (uses mplayer -identify) sequentially called and then in parallel and record and post the Ooopses in this thread here until the authors return from winter sports ;-)
>> Note for Bino users: System requirement is at least debian squeeze-backports X and DRI, otherwise bino will segfault the dri driver, i965 here and you need to build libGLEW(mx) 1.6 from source for debian stable systems, see http://savannah.nongnu.org/bugs/?33368 http://bino3d.org/help-wanted.html
>>
>> 2.
>> With the new amd64 userspace on 3.7.1 SMP PREEMPT kernel things got even more worse here now, got 5 kernel panics in IRQ handler of the crystalhd driver in 1h while watching h.264 with
>> mplayer2/1 (single threaded decoding mode, stereo3d filter) resulting in system halting kernel crashes, I need to setup serial console debugging to get the logs, on my Pentium M i686 vdr machine, kernel has been able to continue at least after the null pointer oopses.
>> We need to have confirmation for this, too.
>>
>> 3.
>> Since the source code still states broadcom staff as module authors and the download on the broadcom website is packaged broken tar.bz2 and does not build here with recent kernels,
>> I'm CC'ing them now, too, and because it's their basic driver skeleton design and the quality and performance of this driver is far below the windows driver, which performs h.264 1080 great with http://mpc-hc.sourceforge.net at 5-10% cpu usage even on xp x64 on a i965, this should be the reference development target.
>>
>> 4.
>> The driver Makefile won't compile it with debian squeeze-backports 3.2 and 3.2 bpo kbuild infrastructure, missing helper scripts and includes, it needs a full ready build kernel from sources:
>>
>> schorpp@tom3:/usr/local/src/crystalhd/driver/linux$ LC_ALL=C make
>> make -C /lib/modules/3.2.0-0.bpo.4-amd64/build SUBDIRS=/mnt/data/usr/local/src/crystalhd/driver/linux modules
>> make[1]: Entering directory `/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-amd64'
>> /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/Makefile:287: /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/scripts/Kbuild.include: Datei oder Verzeichnis nicht gefunden
>> /bin/bash: /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/scripts/gcc-x86_64-has-stack-protector.sh: Datei oder Verzeichnis nicht gefunden
>> /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/arch/x86/Makefile:81: stack protector enabled but no compiler support
>> /bin/bash: /mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/scripts/gcc-goto.sh: Datei oder Verzeichnis nicht gefunden
>> make: *** Leerer Variablenname.  Schluss.
>> make[3]: *** [_module_/mnt/data/usr/local/src/crystalhd/driver/linux] Fehler 2
>> make[2]: *** [sub-make] Error 2
>> make[1]: *** [all] Error 2
>> make[1]: Leaving directory `/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-amd64'
>> make: *** [all] Error 2
>> schorpp@tom3:/usr/local/src/crystalhd/driver/linux$
>>
>> 5.
>> I'm focusing to the 3.x kernel source code delivered staging driver now (only BCM70012 support so far, no BCM70015) meanwhile unitil we get more information.
>>
>> 6.
>> Mythtv and xbmc people please join and report, too.
>>
>> You can get a BCM70012 for just 10US$, a BCM700015 from 30US$ up on Ebay from china, mini-PCI-E to PCI-E adapter cards for not much more, I think it's worth playing ;-)
>>
>> y
>> tom
>>
>> Att: Oopscrash in IRQ- handler:
>>
>> Jan  4 20:43:38 tom3 kernel: [  779.388263] crystalhd 0000:03:00.0: list_index:1 rx[23] rxtot[2031] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
>> Jan  4 20:43:38 tom3 kernel: [  779.435169] crystalhd 0000:03:00.0: list_index:1 rx[24] rxtot[2033] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
>> Jan  4 20:43:38 tom3 kernel: [  779.479479] crystalhd 0000:03:00.0: list_index:1 rx[25] rxtot[2035] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
>> Jan  4 20:43:38 tom3 kernel: [  779.569384] crystalhd 0000:03:00.0: MISSING 2 PICTURES
>> Jan  4 20:43:38 tom3 kernel: [  779.614878] crystalhd 0000:03:00.0: MISSING 3 PICTURES
>> Jan  4 20:43:38 tom3 kernel: [  779.662146] crystalhd 0000:03:00.0: MISSING 2 PICTURES
>> Jan  4 20:43:38 tom3 kernel: [  779.828924] crystalhd 0000:03:00.0: list_index:1 rx[26] rxtot[2057] Y:10 UV:0 Int:800 YDnSz:0 UVDnSz:0
>> Jan  4 20:43:38 tom3 kernel: [  779.890531] BUG: unable to handle kernel NULL pointer dereference at 000000000000002c
>> Jan  4 20:43:38 tom3 kernel: [  779.890668] IP: [<ffffffffa03ce0a0>] crystalhd_dioq_fetch_wait+0x210/0x3e0 [crystalhd]
>> Jan  4 20:43:38 tom3 kernel: [  779.890800] PGD 1573f067 PUD 4a2bf067 PMD 0
>> Jan  4 20:43:38 tom3 kernel: [  779.890888] Oops: 0000 [#1] PREEMPT SMP
>> Jan  4 20:43:38 tom3 kernel: [  779.890974] Modules linked in: nfsv4 nfs fscache uinput parport_pc ppdev lp parport bridge stp llc bnep rfcomm bluetooth nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs cpufreq_powersave cpufreq_stats cpufreq_conservative cpufreq_performance cpufreq_ondemand fuse dm_mod ext3 jbd pciehp arc4 ath5k ath mac80211 snd_hda_codec_analog cfg80211 snd_hda_intel snd_usb_audio snd_hda_codec snd_hwdep snd_pcm_oss thinkpad_acpi snd_mixer_oss rfkill snd_usbmidi_lib snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer pcmcia snd_seq_device psmouse snd yenta_socket tpm_tis pcmcia_rsrc acpi_cpufreq tpm pcmcia_core crystalhd(O) coretemp pcspkr soundcore i2c_i801 serio_raw led_class snd_page_alloc freq_table tpm_bios battery ac nvram rtc_cmos hid_generic wmi mperf evdev processor nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit xt_tcpudp
>> iptable_filter ip_t
>>
>> ables x_tables usb_storage
>> Jan  4 20:43:38 tom3 kernel: ext4 mbcache jbd2 crc16 usbhid hid sg sd_mod crc_t10dif ata_generic uhci_hcd ahci libahci ata_piix atkbd libata xhci_hcd thermal ehci_hcd usbcore e1000e usb_common
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] CPU 0
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] Pid: 6837, comm: mplayer2 Tainted: G           O 3.7.1 #10 LENOVO 7735Y1T/7735Y1T
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] RIP: 0010:[<ffffffffa03ce0a0>]  [<ffffffffa03ce0a0>] crystalhd_dioq_fetch_wait+0x210/0x3e0 [crystalhd]
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] RSP: 0018:ffff88004a387d28  EFLAGS: 00010246
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] RAX: 0000000000000000 RBX: ffff88004a32bf00 RCX: 0000000000000000
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] RDX: 0000000000000046 RSI: ffffffffa03cd57b RDI: ffffffff814d6881
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] RBP: ffff88004a387dd8 R08: 0000000000000000 R09: 0000000000000001
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] R10: 0000000000000000 R11: 0000000000000001 R12: ffff880079e490c0
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] R13: 0000000000000000 R14: ffff880079e490e8 R15: ffff88004a32bf00
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] FS:  00007fe394b83780(0000) GS:ffff88007f400000(0000) knlGS:0000000000000000
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] CR2: 000000000000002c CR3: 00000000157f1000 CR4: 00000000000007f0
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] Process mplayer2 (pid: 6837, threadinfo ffff88004a386000, task ffff88004a32bf00)
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] Stack:
>> Jan  4 20:43:38 tom3 kernel: [  779.891477]  ffff88004a32c5c0 000003448106c4f6 ffff88007aed2a00 ffff88007c162098
>> Jan  4 20:43:38 tom3 kernel: [  779.891477]  ffff88004a387df4 ffff8800157529b0 ffff880015752800 ffff88004a32bf00
>> Jan  4 20:43:38 tom3 kernel: [  779.891477]  ffff880079e49120 0000000100075a56 0000000000000000 ffff88004a32bf00
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] Call Trace:
>> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff81079df0>] ? try_to_wake_up+0x230/0x230
>> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03cf680>] ? bc_cproc_start_capture+0xf0/0xf0 [crystalhd]
>> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03d13de>] crystalhd_hw_get_cap_buffer+0x6e/0x180 [crystalhd]
>> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03cf73d>] bc_cproc_fetch_frame+0xbd/0x1b0 [crystalhd]
>> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03ccdab>] chd_dec_api_cmd+0xab/0x100 [crystalhd]
>> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffffa03ccf42>] chd_dec_ioctl+0x142/0x160 [crystalhd]
>> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff81181d6a>] do_vfs_ioctl+0x2da/0x310
>> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff8118d8f0>] ? fget_light+0x70/0x160
>> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff81181df7>] sys_ioctl+0x57/0x90
>> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff8123c79e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
>> Jan  4 20:43:38 tom3 kernel: [  779.891477]  [<ffffffff814de802>] system_call_fastpath+0x16/0x1b
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] Code: 87 10 e1 45 85 ed 0f 85 4f 01 00 00 48 8b bd 78 ff ff ff e8 a3 e4 c9 e0 85 c0 0f 85 4e 01 00 00 4c 89 e7 e8 b3 f3 ff ff 49 89 c0 <f6> 40 2c 03 0f 85 97 01 00 00 48 8b 4d 80 48 8b 81 d0 00 00 00
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] RIP  [<ffffffffa03ce0a0>] crystalhd_dioq_fetch_wait+0x210/0x3e0 [crystalhd]
>> Jan  4 20:43:38 tom3 kernel: [  779.891477]  RSP <ffff88004a387d28>
>> Jan  4 20:43:38 tom3 kernel: [  779.891477] CR2: 000000000000002c
>> Jan  4 20:43:38 tom3 kernel: [  779.912578] delay: estimated 384, actual 0
>> Jan  4 20:43:38 tom3 kernel: [  779.912610] delay: estimated 384, actual 48
>> Jan  4 20:43:38 tom3 kernel: [  779.914258] ---[ end trace b4d3d5bb1ad97fd7 ]---
>> Jan  4 20:46:05 tom3 kernel: [  926.565061] SysRq : Emergency Remount R/O
>>
>>
>> On 03.01.2013 16:17, Oliver Schinagl wrote:
>>> I actually am one of the few that has one of those decoders so should be able to test things when needed. Just let me know what to test and I will try to comply
>>>
>>> On 02-01-13 08:48, thomas schorpp wrote:
>>>> Hello guys,
>>>>
>>>> I'm working on supporting BCM 970012/15 crystalhd decoder in userspace video/tv apps and
>>>>
>>>> can't find where to report bugs of
>>>>
>>>> http://git.linuxtv.org/jarod/crystalhd.git
>>>> <devinheitmueller> I think he just borrowed our git server.
>>>>
>>>> So I borrow this list to get more developers, testers and sw- quality guys in.
>>>>
>>>> Forgot to mention the attached Oopses under high load and "multithreading" in half automated stress/mass testing.
>>>>
>>>> Scenario e.g.:
>>>> Dec 29 15:58:29 vdr1 kernel: [ 5698.364950] crystalhd 0000:02:00.0: Opening new user[0] handle
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.557932] crystalhd 0000:02:00.0: Opening new user[0] handle
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.846312] crystalhd 0000:02:00.0: Close the handle first..
>>>>
>>>> Looks like the driver is not "threadsave", rebuilding kernel with spinlock debugging, should show more up.
>>>>
>>>> y
>>>> tom
>>>>
>>>> -Att: Kernel OOPS bt, etc
>>>>
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568671] BUG: unable to handle kernel paging request at 2062696c
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568678] IP: [<2062696c>] 0x2062696b
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568681] *pdpt = 0000000008497001 *pde = 0000000000000000
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568684] Oops: 0010 [#4] PREEMPT
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568731] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>>>> snd_seq_midi_eve
>>>> n
>>>> t tveeprom videobuf_dma_sg
>>>> Dec 29 15:56:10 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568770] Pid: 11841, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568772] EIP: 0060:[<2062696c>] EFLAGS: 00010286 CPU: 0
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568775] EIP is at 0x2062696c
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568777] EAX: 00370042 EBX: c843c000 ECX: 636e3800 EDX: 00001c10
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568778] ESI: 000238fc EDI: fb0068fc EBP: c842dea8 ESP: c842de74
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568780]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568781] CR0: 8005003b CR2: 2062696c CR3: 084d9000 CR4: 000007f0
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568783] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568784] DR6: ffff0ff0 DR7: 00000400
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568786] Process mplayer (pid: 11841, ti=c842c000 task=f0aba940 task.ti=c842c000)
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568787] Stack:
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568793]  fa18a569 ffffff10 c117e3f6 00000060 00010246 002a8464 f7138064 fafe3000
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568798]  002a8440 c117e811 f5920988 fafe3000 c843c000 c842ded8 fa18564d c842ded8
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568803]  fa182597 f595a400 f595a62c c842ded8 fa182977 002a8464 f5920900 f595a400
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568804] Call Trace:
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568818]  [<fa18a569>] ? crystalhd_link_download_fw+0x189/0x300 [crystalhd]
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568823]  [<c117e3f6>] ? __copy_from_user_ll+0xd6/0xf0
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568828]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568839]  [<fa18564d>] bc_cproc_download_fw+0xed/0x150 [crystalhd]
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568846]  [<fa182597>] ? chd_dec_proc_user_data+0x237/0x320 [crystalhd]
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568854]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568861]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568870]  [<fa185560>] ? bc_proc_in_completion+0x70/0x70 [crystalhd]
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568877]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568881]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568886]  [<c10685ef>] ? ktime_get+0x6f/0xf0
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568891]  [<c101ca56>] ? lapic_next_event+0x16/0x20
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568895]  [<c106f287>] ? clockevents_program_event+0xe7/0x130
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568898]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568901]  [<c10e4ad1>] ? fget_light+0x101/0x120
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568904]  [<c10e4a30>] ? fget_light+0x60/0x120
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568906]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568910]  [<c137238c>] sysenter_do_call+0x12/0x32
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568914]  [<c1360000>] ? asus_hides_smbus_hostbridge+0x264/0x269
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568917] Code:  Bad EIP value.
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568922] EIP: [<2062696c>] 0x2062696c SS:ESP 0068:c842de74
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568923] CR2: 000000002062696c
>>>> Dec 29 15:56:10 vdr1 kernel: [ 5558.568926] ---[ end trace f5ae98f349325070 ]---
>>>>
>>>> Dec 29 15:58:29 vdr1 kernel: [ 5698.364950] crystalhd 0000:02:00.0: Opening new user[0] handle
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.557932] crystalhd 0000:02:00.0: Opening new user[0] handle
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.846312] crystalhd 0000:02:00.0: Close the handle first..
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.858268] crystalhd 0000:02:00.0: Closing user[0] handle via ioctl with mode 1417200
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.961171] crystalhd_hw_stats: Invalid Arguments
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.961204] BUG: unable to handle kernel NULL pointer dereference at 00000040
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] IP: [<c11848d8>] do_raw_spin_trylock+0x8/0x50
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] *pdpt = 0000000030a1d001 *pde = 0000000000000000
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Oops: 0000 [#5] PREEMPT
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>>>> snd_seq_midi_eve
>>>> n
>>>> t tveeprom videobuf_dma_sg
>>>> Dec 29 15:58:30 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Pid: 11927, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP: 0060:[<c11848d8>] EFLAGS: 00210046 CPU: 0
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP is at do_raw_spin_trylock+0x8/0x50
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EAX: 00000040 EBX: 00000000 ECX: 00000040 EDX: 00000000
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] ESI: 00000040 EDI: 00200292 EBP: c85a7e5c ESP: c85a7e58
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] CR0: 8005003b CR2: 00000040 CR3: 34276000 CR4: 000007f0
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] DR6: ffff0ff0 DR7: 00000400
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Process mplayer (pid: 11927, ti=c85a6000 task=f48ce720 task.ti=c85a6000)
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Stack:
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  00000050 c85a7e80 c136c9b5 00000000 00000002 00000000 fa184bd6 f5955c00
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  f5920988 00000000 c85a7ed8 fa184bd6 00000218 c85a6000 00000000 c85a7eb0
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  c117e811 09ce6618 0c955c00 f5955c00 00000000 09ce6618 c85a7ed8 fa1823b9
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Call Trace:
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c136c9b5>] _raw_spin_lock_irqsave+0x55/0x90
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa184bd6>] ? bc_cproc_get_stats+0x226/0x280 [crystalhd]
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa184bd6>] bc_cproc_get_stats+0x226/0x280 [crystalhd]
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1823b9>] ? chd_dec_proc_user_data+0x59/0x320 [crystalhd]
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1849b0>] ? bc_cproc_reset_stats+0x20/0x20 [crystalhd]
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c104e73e>] ? hrtimer_nanosleep+0x6e/0xf0
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4ad1>] ? fget_light+0x101/0x120
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10e4a30>] ? fget_light+0x60/0x120
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005]  [<c137238c>] sysenter_do_call+0x12/0x32
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] Code: a2 66 90 c7 43 08 00 00 00 00 8b 75 f8 8b 7d fc a1 2c dc 4e c1 89 43 0c 8b 5d f4 89 ec 5d c3 8d 74 26 00 55 89 c1 89 e5 53 31 db <8b> 00 c7 01 00 00 00 00 84 c0 0f 9f c3 85 db 74 17 a1 2c dc 4e
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] EIP: [<c11848d8>] do_raw_spin_trylock+0x8/0x50 SS:ESP 0068:c85a7e58
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] CR2: 0000000000000040
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5698.962005] ---[ end trace f5ae98f349325071 ]---
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5699.232992] note: mplayer[11927] exited with preempt_count 1
>>>> Dec 29 15:58:30 vdr1 kernel: [ 5699.251706] crystalhd 0000:02:00.0: Opening new user[0] handle
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.281871] BUG: unable to handle kernel paging request at 6e757474
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] IP: [<6e757474>] 0x6e757473
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] *pdpt = 000000002fb8b001 *pde = 0000000000000000
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Oops: 0010 [#6] PREEMPT
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>>>> snd_seq_midi_eve
>>>> n
>>>> t tveeprom videobuf_dma_sg
>>>> Dec 29 15:58:31 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Pid: 11926, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: 0060:[<6e757474>] EFLAGS: 00210206 CPU: 0
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP is at 0x6e757474
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EAX: 726f6863 EBX: c538c000 ECX: 00000000 EDX: 00001c08
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] ESI: 000251ac EDI: fb55c1a8 EBP: c8497ea8 ESP: c8497e74
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR0: 8005003b CR2: 6e757474 CR3: 34276000 CR4: 000007f0
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR6: ffff0ff0 DR7: 00000400
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Process mplayer (pid: 11926, ti=c8496000 task=f48c8000 task.ti=c8496000)
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Stack:
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa18a556 ffffffbe c117e3f6 00000060 00210246 002a8464 f7138064 fb537000
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  002a8440 c117e811 f5920988 fb537000 c538c000 c8497ed8 fa18564d c8497ed8
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa182597 f595a000 f595a22c c8497ed8 fa182977 002a8464 f5920900 f595a000
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Call Trace:
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18a556>] ? crystalhd_link_download_fw+0x176/0x300 [crystalhd]
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e3f6>] ? __copy_from_user_ll+0xd6/0xf0
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18564d>] bc_cproc_download_fw+0xed/0x150 [crystalhd]
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182597>] ? chd_dec_proc_user_data+0x237/0x320 [crystalhd]
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa185560>] ? bc_proc_in_completion+0x70/0x70 [crystalhd]
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c136c865>] ? _raw_spin_lock+0x65/0x70
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c109c156>] ? handle_fasteoi_irq+0xb6/0xd0
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ad1>] ? fget_light+0x101/0x120
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4a30>] ? fget_light+0x60/0x120
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c137238c>] sysenter_do_call+0x12/0x32
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Code:  Bad EIP value.
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: [<6e757474>] 0x6e757474 SS:ESP 0068:c8497e74
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR2: 000000006e757474
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.538480] ---[ end trace f5ae98f349325072 ]---
>>>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629049] crystalhd 0000:02:00.0: F/w Signature mismatch
>>>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629065] crystalhd 0000:02:00.0: Firmware Download Failure!! - 21
>>>> Dec 29 15:58:33 vdr1 kernel: [ 5701.754795] crystalhd 0000:02:00.0: Closing user[0] handle via ioctl with mode 1417200
>>>>
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.281871] BUG: unable to handle kernel paging request at 6e757474
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] IP: [<6e757474>] 0x6e757473
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] *pdpt = 000000002fb8b001 *pde = 0000000000000000
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Oops: 0010 [#6] PREEMPT
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Modules linked in: md5 crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core
>>>> snd_seq_midi_eve
>>>> n
>>>> t tveeprom videobuf_dma_sg
>>>> Dec 29 15:58:31 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Pid: 11926, comm: mplayer Tainted: G      D    O 3.6.10-PM #8    /Alviso
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: 0060:[<6e757474>] EFLAGS: 00210206 CPU: 0
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP is at 0x6e757474
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EAX: 726f6863 EBX: c538c000 ECX: 00000000 EDX: 00001c08
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] ESI: 000251ac EDI: fb55c1a8 EBP: c8497ea8 ESP: c8497e74
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR0: 8005003b CR2: 6e757474 CR3: 34276000 CR4: 000007f0
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] DR6: ffff0ff0 DR7: 00000400
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Process mplayer (pid: 11926, ti=c8496000 task=f48c8000 task.ti=c8496000)
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Stack:
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa18a556 ffffffbe c117e3f6 00000060 00210246 002a8464 f7138064 fb537000
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  002a8440 c117e811 f5920988 fb537000 c538c000 c8497ed8 fa18564d c8497ed8
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  fa182597 f595a000 f595a22c c8497ed8 fa182977 002a8464 f5920900 f595a000
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Call Trace:
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18a556>] ? crystalhd_link_download_fw+0x176/0x300 [crystalhd]
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e3f6>] ? __copy_from_user_ll+0xd6/0xf0
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c117e811>] ? _copy_from_user+0x41/0xb0
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa18564d>] bc_cproc_download_fw+0xed/0x150 [crystalhd]
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182597>] ? chd_dec_proc_user_data+0x237/0x320 [crystalhd]
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182977>] ? chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa182b5e>] chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa185560>] ? bc_proc_in_completion+0x70/0x70 [crystalhd]
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<fa1829f0>] ? chd_dec_free_iodata+0x50/0x50 [crystalhd]
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f4355>] do_vfs_ioctl+0x535/0x580
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c136c865>] ? _raw_spin_lock+0x65/0x70
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c109c156>] ? handle_fasteoi_irq+0xb6/0xd0
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ab8>] ? fget_light+0xe8/0x120
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4ad1>] ? fget_light+0x101/0x120
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10e4a30>] ? fget_light+0x60/0x120
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c10f43cd>] sys_ioctl+0x2d/0x60
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005]  [<c137238c>] sysenter_do_call+0x12/0x32
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] Code:  Bad EIP value.
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] EIP: [<6e757474>] 0x6e757474 SS:ESP 0068:c8497e74
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.282005] CR2: 000000006e757474
>>>> Dec 29 15:58:31 vdr1 kernel: [ 5699.538480] ---[ end trace f5ae98f349325072 ]---
>>>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629049] crystalhd 0000:02:00.0: F/w Signature mismatch
>>>> Dec 29 15:58:33 vdr1 kernel: [ 5701.629065] crystalhd 0000:02:00.0: Firmware Download Failure!! - 21
>>>> Dec 29 15:58:33 vdr1 kernel: [ 5701.754795] crystalhd 0000:02:00.0: Closing user[0] handle via ioctl with mode 1417200
>>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-media" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>>
>>
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] crystalhd git.linuxtv.org kernel driver: FIX null pointer BUG in crystalhd_dioq_fetch_wait() on queue(s) overload
  2013-01-11  0:43       ` [BUG] crystalhd git.linuxtv.org kernel driver: Crashing again Linux, 3.2, using mozilla flashplugin from adobe thomas schorpp
@ 2013-01-25 21:38         ` thomas schorpp
  2013-02-01  1:52         ` [PATCH] crystalhd git.linuxtv.org kernel driver: FIX MORE null pointer BUGs triggered by multithreaded or faulty apps thomas schorpp
                           ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: thomas schorpp @ 2013-01-25 21:38 UTC (permalink / raw)
  To: linux-media; +Cc: j, jarod

[-- Attachment #1: Type: text/plain, Size: 8318 bytes --]

This patch should pass at least one test case of this bug.

Signed-off-by: Thomas Schorpp <thomas.schorpp@gmail.com>

y
tom

8043-Jan 24 18:33:14 tom3 kernel: [  457.636878] BUG: unable to handle kernel NULL pointer dereference at 000000000000002c
8044:Jan 24 18:33:14 tom3 kernel: [  457.637016] IP: [<ffffffffa043a14c>] crystalhd_dioq_fetch_wait+0x25c/0x410 [crystalhd]
8045-Jan 24 18:33:14 tom3 kernel: [  457.637150] PGD 631fe067 PUD 57474067 PMD 0
8046-Jan 24 18:33:14 tom3 kernel: [  457.637238] Oops: 0000 [#1] PREEMPT SMP
8047-Jan 24 18:33:14 tom3 kernel: [  457.637326] CPU 0
8048-Jan 24 18:33:14 tom3 kernel: [  457.637361] Modules linked in: uinput parport_pc ppdev lp parport bluetooth nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs acpi_cpufreq mperf cpufreq_powersave cpufreq_stats cpufreq_conservative cpufreq_performance cpufreq_ondemand freq_table fuse dm_mod ext3 jbd pciehp arc4 ath5k ath snd_hda_codec_analog mac80211 cfg80211 snd_hda_intel snd_hda_codec snd_usb_audio thinkpad_acpi snd_pcm_oss snd_mixer_oss snd_hwdep rfkill snd_pcm snd_usbmidi_lib snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device gspca_zc3xx gspca_main snd videodev pcmcia usb_storage v4l2_compat_ioctl32 psmouse yenta_socket tpm_tis pcmcia_rsrc crystalhd(O) snd_page_alloc soundcore tpm pcmcia_core tpm_bios pcspkr serio_raw i2c_i801 nvram wmi rtc_cmos battery ac evdev processor nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit xt_tcpudp iptable_filter ip_tables x
_tables ext4 mbcache jbd2 crc16
8049-Jan 24 18:33:14 tom3 kernel: usbhid hid sg sd_mod crc_t10dif ata_generic uhci_hcd ahci libahci ata_piix atkbd libata thermal xhci_hcd ehci_hcd usbcore e1000e usb_common [last unloaded: scsi_wait_scan]
8050-Jan 24 18:33:14 tom3 kernel: [  457.637841]
8051-Jan 24 18:33:14 tom3 kernel: [  457.637841] Pid: 6318, comm: ffmpeg Tainted: G           O 3.2.36-dirty #7 LENOVO 7735Y1T/7735Y1T
8052:Jan 24 18:33:14 tom3 kernel: [  457.637841] RIP: 0010:[<ffffffffa043a14c>]  [<ffffffffa043a14c>] crystalhd_dioq_fetch_wait+0x25c/0x410 [crystalhd]
8053-Jan 24 18:33:14 tom3 kernel: [  457.637841] RSP: 0018:ffff88006300dd48  EFLAGS: 00010246
8054-Jan 24 18:33:14 tom3 kernel: [  457.637841] RAX: 0000000000000000 RBX: ffff88007b1cde50 RCX: 0000000000000000
8055-Jan 24 18:33:14 tom3 kernel: [  457.637841] RDX: 0000000000000046 RSI: ffffffffa04395c3 RDI: ffffffff81493e82
8056-Jan 24 18:33:14 tom3 kernel: [  457.637841] RBP: ffff88006300ddf8 R08: 0000000000000000 R09: 0000000000000000
8057-Jan 24 18:33:14 tom3 kernel: [  457.637841] R10: 0000000000000000 R11: ffff88007b1ce510 R12: ffff88007a855d80
8058-Jan 24 18:33:14 tom3 kernel: [  457.637841] R13: 0000000000000000 R14: ffff88007a855da8 R15: ffff88007b1cde50
8059-Jan 24 18:33:14 tom3 kernel: [  457.637841] FS:  00007f559fa7b760(0000) GS:ffff88007f400000(0000) knlGS:0000000000000000
8060-Jan 24 18:33:14 tom3 kernel: [  457.637841] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
8061-Jan 24 18:33:14 tom3 kernel: [  457.637841] CR2: 000000000000002c CR3: 0000000057470000 CR4: 00000000000006f0
8062-Jan 24 18:33:14 tom3 kernel: [  457.637841] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
8063-Jan 24 18:33:14 tom3 kernel: [  457.637841] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
8064-Jan 24 18:33:14 tom3 kernel: [  457.637841] Process ffmpeg (pid: 6318, threadinfo ffff88006300c000, task ffff88007b1cde50)
8065-Jan 24 18:33:14 tom3 kernel: [  457.637841] Stack:
8066-Jan 24 18:33:14 tom3 kernel: [  457.637841]  0000000000000327 ffff88007b1ce510 ffff88006b199400 ffff88007c1b1090
8067-Jan 24 18:33:14 tom3 kernel: [  457.637841]  ffff88006300de14 ffff8800594145b0 ffff880059414400 ffff88007b1cde50
8068-Jan 24 18:33:14 tom3 kernel: [  457.637841]  ffff88007a855de0 0000000100026d5c 0000000000000000 ffff88007b1cde50
8069-Jan 24 18:33:14 tom3 kernel: [  457.637841] Call Trace:
8070-Jan 24 18:33:14 tom3 kernel: [  457.637841]  [<ffffffff810497e0>] ? try_to_wake_up+0x260/0x260
8071-Jan 24 18:33:14 tom3 kernel: [  457.637841]  [<ffffffffa043b7b0>] ? bc_cproc_start_capture+0x100/0x100 [crystalhd]
8072-Jan 24 18:33:14 tom3 kernel: [  457.637841]  [<ffffffffa043d566>] crystalhd_hw_get_cap_buffer+0x56/0x1a0 [crystalhd]
8073-Jan 24 18:33:14 tom3 kernel: [  457.637841]  [<ffffffffa043b83d>] bc_cproc_fetch_frame+0x8d/0x1b0 [crystalhd]
8074-Jan 24 18:33:14 tom3 kernel: [  457.637841]  [<ffffffffa0438db1>] chd_dec_api_cmd+0x81/0x100 [crystalhd]
8075-Jan 24 18:33:14 tom3 kernel: [  457.637841]  [<ffffffffa0438ec0>] chd_dec_ioctl+0x90/0x170 [crystalhd]
8076-Jan 24 18:33:14 tom3 kernel: [  457.637841]  [<ffffffff811704bc>] do_vfs_ioctl+0x9c/0x330
8077-Jan 24 18:33:14 tom3 kernel: [  457.637841]  [<ffffffff8115ebb0>] ? fget_light+0x40/0x140
8078-Jan 24 18:33:14 tom3 kernel: [  457.637841]  [<ffffffff8108d9bd>] ? trace_hardirqs_on_caller+0x11d/0x1b0
8079-Jan 24 18:33:14 tom3 kernel: [  457.637841]  [<ffffffff8117079f>] sys_ioctl+0x4f/0x80
8080-Jan 24 18:33:14 tom3 kernel: [  457.637841]  [<ffffffff8149b6eb>] system_call_fastpath+0x16/0x1b
8081-Jan 24 18:33:14 tom3 kernel: [  457.637841] Code: 89 f7 e8 18 9d 05 e1 45 85 ed 75 81 48 8b bd 78 ff ff ff e8 77 17 c4 e0 85 c0 0f 85 c7 00 00 00 4c 89 e7 e8 57 f3 ff ff 49 89 c0 <f6> 40 2c 03 0f 85 3d 01 00 00 48 8b 4d 80 48 8b 81 d0 00 00 00
8082:Jan 24 18:33:14 tom3 kernel: [  457.637841] RIP  [<ffffffffa043a14c>] crystalhd_dioq_fetch_wait+0x25c/0x410 [crystalhd]
8083-Jan 24 18:33:14 tom3 kernel: [  457.637841]  RSP <ffff88006300dd48>
8084-Jan 24 18:33:14 tom3 kernel: [  457.637841] CR2: 000000000000002c
8085-Jan 24 18:33:14 tom3 kernel: [  457.663980] ---[ end trace 784283982dcd2475 ]---

8081-Jan 24 18:33:14 tom3 kernel: [ 457.637841] Code: 89 f7 e8 18 9d 05 e1 45 85 ed 75 81 48 8b bd 78 ff ff ff e8 77 17 c4 e0 85 c0 0f 85 c7 00 00 00 4c 89 e7 e8 57 f3 ff ff 49 89 c0 <f6> 40 2c 03 0f 85 3d 01 00 00 48 8b 4d 80 48 8b 81 d0 00 00 00

$ linux-stable/scripts/decodecode < oops.txt
All code
========
    0:	89 f7                	mov    %esi,%edi
    2:	e8 18 9d 05 e1       	callq  0xffffffffe1059d1f
    7:	45 85 ed             	test   %r13d,%r13d
    a:	75 81                	jne    0xffffffffffffff8d
    c:	48 8b bd 78 ff ff ff 	mov    -0x88(%rbp),%rdi
   13:	e8 77 17 c4 e0       	callq  0xffffffffe0c4178f
   18:	85 c0                	test   %eax,%eax
   1a:	0f 85 c7 00 00 00    	jne    0xe7
   20:	4c 89 e7             	mov    %r12,%rdi
   23:	e8 57 f3 ff ff       	callq  0xfffffffffffff37f
   28:	49 89 c0             	mov    %rax,%r8
   2b:*	f6 40 2c 03          	testb  $0x3,0x2c(%rax)     <-- trapping instruction
   2f:	0f 85 3d 01 00 00    	jne    0x172
   35:	48 8b 4d 80          	mov    -0x80(%rbp),%rcx
   39:	48 8b 81 d0 00 00 00 	mov    0xd0(%rcx),%rax

Code starting with the faulting instruction
===========================================
    0:	f6 40 2c 03          	testb  $0x3,0x2c(%rax)
    4:	0f 85 3d 01 00 00    	jne    0x147
    a:	48 8b 4d 80          	mov    -0x80(%rbp),%rcx
    e:	48 8b 81 d0 00 00 00 	mov    0xd0(%rcx),%rax

$ gdb /mnt/data/usr/local/src/crystalhd/driver/linux/crystalhd.ko
(gdb) l *(crystalhd_dioq_fetch_wait + 604)
0x216c is in crystalhd_dioq_fetch_wait (/mnt/data/usr/local/src/crystalhd/driver/linux/crystalhd_misc.c:516).
511				/* Lock against checks from get status calls */
512				if(down_interruptible(&hw->fetch_sem))
513					goto sem_error;
514				r_pkt = crystalhd_dioq_fetch(ioq);
515				/* If format change packet, then return with out checking anything */
516				if (r_pkt->flags & (COMP_FLAG_PIB_VALID | COMP_FLAG_FMT_CHANGE)) <--- x86 testb instruction XXXXXX
517					goto sem_rel_return;
518				if (hw->adp->pdev->device == BC_PCI_DEVID_LINK) {
519					picYcomp = link_GetRptDropParam(hw, hw->PICHeight, hw->PICWidth, (void *)r_pkt);
520				}
(gdb) l *(crystalhd_dioq_fetch_wait + 0x410)
0x2320 is in bc_kern_dma_free (/mnt/data/usr/local/src/crystalhd/driver/linux/crystalhd_misc.c:262).
257	 * Return:
258	 *     none.
259	 */
260	void bc_kern_dma_free(struct crystalhd_adp *adp, uint32_t sz, void *ka,
261			      dma_addr_t phy_addr)
262	{
263		if (!adp || !ka || !sz || !phy_addr) {
264			printk(KERN_ERR "%s: Invalid arg\n", __func__);
265			return;
266		}

[-- Attachment #2: crystalhd-nullpointer-bugfix.schorpp.01.patch --]
[-- Type: text/x-diff, Size: 819 bytes --]

diff --git a/driver/linux/crystalhd_misc.c b/driver/linux/crystalhd_misc.c
index 410ab9d..b3ce457 100644
--- a/driver/linux/crystalhd_misc.c
+++ b/driver/linux/crystalhd_misc.c
@@ -512,7 +512,10 @@ void *crystalhd_dioq_fetch_wait(struct crystalhd_hw *hw, uint32_t to_secs, uint3
 			if(down_interruptible(&hw->fetch_sem))
 				goto sem_error;
 			r_pkt = crystalhd_dioq_fetch(ioq);
-			/* If format change packet, then return with out checking anything */
+			/* If no packet then up and return zero otherwise will *0 BUG the kernel on heavy dioq load */
+			if (!r_pkt) 
+				goto sem_rel_return;
+			/* If format change packet then return without checking anything */
 			if (r_pkt->flags & (COMP_FLAG_PIB_VALID | COMP_FLAG_FMT_CHANGE))
 				goto sem_rel_return;
 			if (hw->adp->pdev->device == BC_PCI_DEVID_LINK) {

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH] crystalhd git.linuxtv.org kernel driver: FIX MORE null pointer BUGs triggered by multithreaded or faulty apps
  2013-01-11  0:43       ` [BUG] crystalhd git.linuxtv.org kernel driver: Crashing again Linux, 3.2, using mozilla flashplugin from adobe thomas schorpp
  2013-01-25 21:38         ` [PATCH] crystalhd git.linuxtv.org kernel driver: FIX null pointer BUG in crystalhd_dioq_fetch_wait() on queue(s) overload thomas schorpp
@ 2013-02-01  1:52         ` thomas schorpp
  2013-02-01 20:23         ` [PATCH] crystalhd git.linuxtv.org kernel driver: FIX kernel unhandled paging request BUG " thomas schorpp
                           ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: thomas schorpp @ 2013-02-01  1:52 UTC (permalink / raw)
  To: linux-media; +Cc: j, jarod, 699470

[-- Attachment #1: Type: text/plain, Size: 19560 bytes --]

This patch should pass the 2nd test case of this bug.

The Broadcom driver can only handle strict open->close sequences, not in parallel or subsequent open() before HANDLE close(),
so using the usual multithreaded or faulty apps will crash the kernel due to missing !ctx->hw_ctx exception catchers:

[545486.745240] crystalhd 0000:03:00.0: Closing user[0] handle with mode ffffffff
[545486.832451] BUG: unable to handle kernel NULL pointer dereference at 00000000000002c8
[545486.832525] IP: [<ffffffffa0765b0b>] bc_cproc_reg_rd+0x3b/0x50 [crystalhd]
[545486.832587] PGD 4508067 PUD fb7c067 PMD 0
[545486.832624] Oops: 0000 [#1] PREEMPT SMP
[545486.832660] CPU 0
[545486.832676] Modules linked in: crystalhd(O) udf crc_itu_t sr_mod cdrom nfs fscache uinput parport_pc ppdev lp parport bluetooth nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs acpi_cpufreq mperf cpufreq_powersave cpufreq_stats cpufreq_conservative cpufreq_performance cpufreq_ondemand freq_table fuse dm_mod ext3 jbd pciehp arc4 ath5k ath mac80211 snd_hda_codec_analog snd_hda_intel snd_hda_codec snd_usb_audio cfg80211 snd_pcm_oss snd_mixer_oss snd_hwdep snd_usbmidi_lib snd_pcm thinkpad_acpi
[545486.833129] crystalhd_hw_stats: Invalid Arguments
[545486.833014]  snd_seq_dummy snd_seq_oss rfkill snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq gspca_zc3xx pcmcia gspca_main snd_timer tpm_tis snd_seq_device videodev psmouse tpm usb_storage yenta_socket snd pcmcia_rsrc tpm_bios i2c_i801 nvram v4l2_compat_ioctl32 pcmcia_core soundcore snd_page_alloc rtc_cmos wmi pcspkr serio_raw processor battery ac evdev nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit xt_tcpudp iptable_filter ip_tables x_tables ext4 mbcache jbd2 crc16 usbhid hid sg sd_mod crc_t10dif ata_generic uhci_hcd xhci_hcd ahci libahci ata_piix libata thermal ehci_hcd atkbd usbcore e1000e usb_common [last unloaded: crystalhd]
[545486.833014]
[545486.833014] Pid: 27551, comm: matroskademux1: Tainted: G        W  O 3.2.37-dirty #8 LENOVO 7735Y1T/7735Y1T
[545486.833014] RIP: 0010:[<ffffffffa0765b0b>]  [<ffffffffa0765b0b>] bc_cproc_reg_rd+0x3b/0x50 [crystalhd]
[545486.833014] RSP: 0018:ffff8800171f1e68  EFLAGS: 00010286
[545486.833014] RAX: 0000000000000000 RBX: ffff880011fc9800 RCX: 00000000fffffffc
[545486.833014] RDX: 0000000000000000 RSI: 000000000034000c RDI: ffff88000ddd6e00
[545486.833014] RBP: ffff8800171f1e78 R08: 0000000000000001 R09: 0000000000000000
[545486.833014] R10: fffffffff3640327 R11: ffff880031fd45a0 R12: 0000000003054fb0
[545486.833014] R13: ffff880011fc9800 R14: 0000000000000000 R15: ffffffffa0765ad0
[545486.833014] FS:  00007fd179f36700(0000) GS:ffff88007f400000(0000) knlGS:0000000000000000
[545486.833014] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[545486.833014] CR2: 00000000000002c8 CR3: 0000000017098000 CR4: 00000000000006f0
[545486.833014] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[545486.833014] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[545486.833014] Process matroskademux1: (pid: 27551, threadinfo ffff8800171f0000, task ffff880031fd3ee0)
[545486.833014] Stack:
[545486.833014]  0000000000000000 ffff88000ddd6e00 ffff8800171f1ec8 ffffffffa0763da1
[545486.833014]  0000000000000000 00000000c2206202 ffff8800171f1ec8 ffff88000ddd6e00
[545486.833014]  ffff88000ddd6ed0 00000000c2206202 0000000003054fb0 0000000000000000
[545486.833014] Call Trace:
[545486.833014]  [<ffffffffa0763da1>] chd_dec_api_cmd+0x81/0x100 [crystalhd]
[545486.833014]  [<ffffffffa0763eb0>] chd_dec_ioctl+0x90/0x170 [crystalhd]
[545486.833014]  [<ffffffff811701fc>] do_vfs_ioctl+0x9c/0x330
[545486.833014]  [<ffffffff8115e930>] ? fget_light+0x40/0x140
[545486.833014]  [<ffffffff8108d8bd>] ? trace_hardirqs_on_caller+0x11d/0x1b0
[545486.833014]  [<ffffffff811704df>] sys_ioctl+0x4f/0x80
[545486.833014]  [<ffffffff8149ad6b>] system_call_fastpath+0x16/0x1b
[545486.833014] Code: f3 48 85 f6 75 12 48 83 c4 08 b8 01 00 00 00 5b c9 c3 66 0f 1f 44 00 00 48 85 ff 74 e9 48 8b 87 80 00 00 00 8b 76 10 48 8b 7f 08 <ff> 90 c8 02 00 00 89 43 14 48 83 c4 08 31 c0 5b c9 c3 0f 1f 00
[545486.833014] RIP  [<ffffffffa0765b0b>] bc_cproc_reg_rd+0x3b/0x50 [crystalhd]
[545486.833014]  RSP <ffff8800171f1e68>
[545486.833014] CR2: 00000000000002c8
[545486.860403] ---[ end trace 32f093356a8be591 ]---

[545486.836574] BUG: unable to handle kernel NULL pointer dereference at 0000000000000084
[545486.836574] IP: [<ffffffff812355fe>] do_raw_spin_lock+0x1e/0x140
[545486.836574] PGD 4508067 PUD fb7c067 PMD 0
[545486.836574] Oops: 0000 [#2] PREEMPT SMP
[545486.836574] CPU 1
[545486.836574] Modules linked in: crystalhd(O) udf crc_itu_t sr_mod cdrom nfs fscache uinput parport_pc ppdev lp parport bluetooth nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs acpi_cpufreq mperf cpufreq_powersave cpufreq_stats cpufreq_conservative cpufreq_performance cpufreq_ondemand freq_table fuse dm_mod ext3 jbd pciehp arc4 ath5k ath mac80211 snd_hda_codec_analog snd_hda_intel snd_hda_codec snd_usb_audio cfg80211 snd_pcm_oss snd_mixer_oss snd_hwdep snd_usbmidi_lib snd_pcm thinkpad_acpi snd_seq_dummy snd_seq_oss rfkill snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq gspca_zc3xx pcmcia gspca_main snd_timer tpm_tis snd_seq_device videodev psmouse tpm usb_storage yenta_socket snd pcmcia_rsrc tpm_bios i2c_i801 nvram v4l2_compat_ioctl32 pcmcia_core soundcore snd_page_alloc rtc_cmos wmi pcspkr serio_raw processor battery ac evdev nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit xt_tcpudp iptable_filter ip_ta
bles x_tables ext4 mbcache jbd2 crc16 usbhid hid sg sd_mod crc_t10dif ata_generic uhci_hcd xhci_hcd ahci libahci ata_piix libata thermal ehci_hcd atkbd usbcore e1000e usb_common [last unloaded: crystalhd]
[545486.836574]
[545486.836574] Pid: 27553, comm: matroskademux1: Tainted: G      D W  O 3.2.37-dirty #8 LENOVO 7735Y1T/7735Y1T
[545486.836574] RIP: 0010:[<ffffffff812355fe>]  [<ffffffff812355fe>] do_raw_spin_lock+0x1e/0x140
[545486.836574] RSP: 0018:ffff8800045c9dc8  EFLAGS: 00010082
[545486.836574] RAX: ffff880011f65e50 RBX: 0000000000000080 RCX: 0000000000000000
[545486.836574] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000080
[545486.836574] RBP: ffff8800045c9de8 R08: 0000000000000000 R09: 0000000000000001
[545486.836574] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000282
[545486.836574] R13: ffff8800045c9e28 R14: 0000000000000000 R15: ffffffffa07662a0
[545486.836574] FS:  00007fd179530700(0000) GS:ffff88007f500000(0000) knlGS:0000000000000000
[545486.836574] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[545486.836574] CR2: 0000000000000084 CR3: 0000000017098000 CR4: 00000000000006e0
[545486.836574] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[545486.836574] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[545486.836574] Process matroskademux1: (pid: 27553, threadinfo ffff8800045c8000, task ffff880011f65e50)
[545486.836574] Stack:
[545486.836574]  0000000000000080 0000000000000282 ffff8800045c9e28 0000000000000000
[545486.836574]  ffff8800045c9e18 ffffffff81492ece ffffffffa0766374 0000000000000000
[545486.836574]  ffff880011fcbc00 ffff88000ddd6ec0 ffff8800045c9e78 ffffffffa0766374
[545486.836574] Call Trace:
[545486.836574]  [<ffffffff81492ece>] _raw_spin_lock_irqsave+0x4e/0x60
[545486.836574]  [<ffffffffa0766374>] ? bc_cproc_get_stats+0xd4/0x2b0 [crystalhd]
[545486.836574]  [<ffffffffa0766374>] bc_cproc_get_stats+0xd4/0x2b0 [crystalhd]
[545486.836574]  [<ffffffffa0763b15>] ? chd_dec_proc_user_data+0x65/0x270 [crystalhd]
[545486.836574]  [<ffffffffa0763da1>] chd_dec_api_cmd+0x81/0x100 [crystalhd]
[545486.836574]  [<ffffffffa0763eb0>] chd_dec_ioctl+0x90/0x170 [crystalhd]
[545486.836574]  [<ffffffff811701fc>] do_vfs_ioctl+0x9c/0x330
[545486.836574]  [<ffffffff8115e930>] ? fget_light+0x40/0x140
[545486.836574]  [<ffffffff8108d7c0>] ? trace_hardirqs_on_caller+0x20/0x1b0
[545486.836574]  [<ffffffff811704df>] sys_ioctl+0x4f/0x80
[545486.836574]  [<ffffffff8149ad6b>] system_call_fastpath+0x16/0x1b
[545486.836574] Code: eb 8b 66 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 48 83 ec 20 48 89 1c 24 4c 89 64 24 08 4c 89 6c 24 10 4c 89 74 24 18 48 89 fb <81> 7f 04 ad 4e ad de 0f 85 d2 00 00 00 65 48 8b 04 25 00 b6 00
[545486.836574] RIP  [<ffffffff812355fe>] do_raw_spin_lock+0x1e/0x140
[545486.836574]  RSP <ffff8800045c9dc8>
[545486.836574] CR2: 0000000000000084
[545486.836574] ---[ end trace 32f093356a8be592 ]---
[545486.860850] note: matroskademux1:[27553] exited with preempt_count 1

The patch will prevent accessing nonexistant driver instances but gstreamer will fail, but totem-gstreamer OK with it:

Feb  1 02:14:11 tom3 kernel: [  713.297215] crystalhd 0000:03:00.0: Opening new user[0] handle
Feb  1 02:14:12 tom3 kernel: [  713.552294] crystalhd 0000:03:00.0: Closing user[0] handle with mode ffffffff
Feb  1 02:14:12 tom3 kernel: [  713.756852] crystalhd 0000:03:00.0: Opening new user[0] handle
Feb  1 02:14:12 tom3 kernel: [  713.757000] crystalhd 0000:03:00.0: Opening new user[0] handle
Feb  1 02:14:12 tom3 kernel: [  713.757086] crystalhd 0000:03:00.0: Closing user[0] handle with mode ffffffff
Feb  1 02:14:12 tom3 kernel: [  713.758074] crystalhd 0000:03:00.0: Opening new user[0] handle
Feb  1 02:14:12 tom3 kernel: [  714.011311] crystalhd 0000:03:00.0: Closing user[0] handle with mode ffffffff
Feb  1 02:14:12 tom3 kernel: [  714.092062] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.094653] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.096877] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.099108] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.101308] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.103516] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.105788] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.108209] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.110543] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.112902] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.115448] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.117792] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.120130] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.122453] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.124742] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.126979] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.129194] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.131377] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.133582] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.135812] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.138164] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.140509] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.142820] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.145174] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.147475] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.149903] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.152618] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.154957] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.157631] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.159962] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.162588] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.164878] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.167105] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.169320] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.171507] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.173748] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.175952] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.178202] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.180469] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.182766] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.186970] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.189621] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.192253] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.194577] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.195362] crystalhd_hw_setup_dma_rings: Invalid Arguments
Feb  1 02:14:12 tom3 kernel: [  714.197048] crystalhd 0000:03:00.0: bc_cproc_flush_cap_buffs: Invalid Arg
Feb  1 02:14:12 tom3 kernel: [  714.202175] crystalhd 0000:03:00.0: Closing user[0] handle via ioctl with mode 1c200
Feb  1 02:14:12 tom3 kernel: [  714.202181] crystalhd_hw_stop_capture: Invalid Arguments
Feb  1 02:14:12 tom3 kernel: [  714.202184] crystalhd_hw_free_dma_rings: Invalid Arguments
Feb  1 02:14:12 tom3 kernel: [  714.202267] crystalhd_hw_close: Invalid Arguments

schorpp@tom3:~$ transmageddon
Traceback (most recent call last):
   File "transmageddon.py", line 676, in on_presetchoice_changed
     self.devicename= self.presetchoices[presetchoice]
KeyError: 'Keine Voreinstellungen'
Running DIL (3.22.0) Version
DtsDeviceOpen: Opening HW in mode 0
DtsDevRegisterRead: Ioctl failed: 1
DtsDevRegisterWr: Ioctl failed: 1
DtsDevRegisterWr: Ioctl failed: 1
Clock set to 180
DtsDevRegisterRead: Ioctl failed: 1
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsDevRegisterRead: Ioctl failed: 1
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsDevRegisterRead: Ioctl failed: 1
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsDevRegisterRead: Ioctl failed: 1
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsDevRegisterRead: Ioctl failed: 1
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsDevRegisterRead: Ioctl failed: 1
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsDevRegisterRead: Ioctl failed: 1
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsDevRegisterRead: Ioctl failed: 1
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsDevRegisterRead: Ioctl failed: 1
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsDevRegisterRead: Ioctl failed: 1
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsNotifyMode: Ioctl failed: 1
Notify Operating Mode Failed
DtsAllocIoctlData Error
Unable to detach from Dil shared memory ...
DtsDelDilShMem:Unable get shmid ...
Stream with high frequencies VQ coding
/usr/bin/transmageddon: Zeile 3:  6499 Speicherzugriffsfehler  python transmageddon.py
schorpp@tom3:~$

This is a quick&dirty hack emergency critical bug fix only! May break other apps than totem, ffmpeg, mplayer, be warned!

--------------------------

Patch attached.

crystalhd git.linuxtv.org kernel driver: FIX MORE null pointer BUGs triggered by multithreaded or faulty apps

Signed-off-by: Thomas Schorpp <thomas.schorpp@gmail.com>

y
tom



[-- Attachment #2: crystalhd-nullpointer-bugfix.schorpp.02.patch --]
[-- Type: text/x-diff, Size: 5207 bytes --]

diff --git a/driver/linux/crystalhd_cmds.c b/driver/linux/crystalhd_cmds.c
index cecd710..b62811b 100644
--- a/driver/linux/crystalhd_cmds.c
+++ b/driver/linux/crystalhd_cmds.c
@@ -154,7 +154,7 @@ static BC_STATUS bc_cproc_get_hwtype(struct crystalhd_cmd *ctx, crystalhd_ioctl_
 static BC_STATUS bc_cproc_reg_rd(struct crystalhd_cmd *ctx,
 				 crystalhd_ioctl_data *idata)
 {
-	if (!ctx || !idata)
+	if (!ctx || !ctx->hw_ctx || !idata)
 		return BC_STS_INV_ARG;
 	idata->udata.u.regAcc.Value = ctx->hw_ctx->pfnReadDevRegister(ctx->adp,
 					idata->udata.u.regAcc.Offset);
@@ -164,7 +164,7 @@ static BC_STATUS bc_cproc_reg_rd(struct crystalhd_cmd *ctx,
 static BC_STATUS bc_cproc_reg_wr(struct crystalhd_cmd *ctx,
 				 crystalhd_ioctl_data *idata)
 {
-	if (!ctx || !idata)
+	if (!ctx || !ctx->hw_ctx || !idata)
 		return BC_STS_INV_ARG;
 
 	ctx->hw_ctx->pfnWriteDevRegister(ctx->adp, idata->udata.u.regAcc.Offset,
@@ -176,7 +176,7 @@ static BC_STATUS bc_cproc_reg_wr(struct crystalhd_cmd *ctx,
 static BC_STATUS bc_cproc_link_reg_rd(struct crystalhd_cmd *ctx,
 				      crystalhd_ioctl_data *idata)
 {
-	if (!ctx || !idata)
+	if (!ctx || !ctx->hw_ctx || !idata)
 		return BC_STS_INV_ARG;
 
 	idata->udata.u.regAcc.Value = ctx->hw_ctx->pfnReadFPGARegister(ctx->adp,
@@ -187,7 +187,7 @@ static BC_STATUS bc_cproc_link_reg_rd(struct crystalhd_cmd *ctx,
 static BC_STATUS bc_cproc_link_reg_wr(struct crystalhd_cmd *ctx,
 				      crystalhd_ioctl_data *idata)
 {
-	if (!ctx || !idata)
+	if (!ctx || !ctx->hw_ctx || !idata)
 		return BC_STS_INV_ARG;
 
 	ctx->hw_ctx->pfnWriteFPGARegister(ctx->adp, idata->udata.u.regAcc.Offset,
@@ -201,7 +201,7 @@ static BC_STATUS bc_cproc_mem_rd(struct crystalhd_cmd *ctx,
 {
 	BC_STATUS sts = BC_STS_SUCCESS;
 
-	if (!ctx || !idata || !idata->add_cdata)
+	if (!ctx || !ctx->hw_ctx || !idata || !idata->add_cdata)
 		return BC_STS_INV_ARG;
 
 	if (idata->udata.u.devMem.NumDwords > (idata->add_cdata_sz / 4)) {
@@ -220,7 +220,7 @@ static BC_STATUS bc_cproc_mem_wr(struct crystalhd_cmd *ctx,
 {
 	BC_STATUS sts = BC_STS_SUCCESS;
 
-	if (!ctx || !idata || !idata->add_cdata)
+	if (!ctx || !ctx->hw_ctx || !idata || !idata->add_cdata)
 		return BC_STS_INV_ARG;
 
 	if (idata->udata.u.devMem.NumDwords > (idata->add_cdata_sz / 4)) {
@@ -307,7 +307,7 @@ static BC_STATUS bc_cproc_download_fw(struct crystalhd_cmd *ctx,
 
 	dev_dbg(chddev(), "Downloading FW\n");
 
-	if (!ctx || !idata || !idata->add_cdata || !idata->add_cdata_sz) {
+	if (!ctx || !ctx->hw_ctx || !idata || !idata->add_cdata || !idata->add_cdata_sz) {
 		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -350,7 +350,7 @@ static BC_STATUS bc_cproc_do_fw_cmd(struct crystalhd_cmd *ctx, crystalhd_ioctl_d
 	BC_STATUS sts;
 	uint32_t *cmd;
 
-	if (!(ctx->state & BC_LINK_INIT)) {
+	if ( !ctx || !idata || !(ctx->state & BC_LINK_INIT) || !ctx->hw_ctx) {
 		dev_dbg(dev, "Link invalid state do fw cmd %x \n", ctx->state);
 		return BC_STS_ERR_USAGE;
 	}
@@ -432,7 +432,7 @@ static BC_STATUS bc_cproc_hw_txdma(struct crystalhd_cmd *ctx,
 	wait_queue_head_t event;
 	int rc = 0;
 
-	if (!ctx || !idata || !dio) {
+	if (!ctx || !ctx->hw_ctx || !idata || !dio) {
 		dev_err(dev, "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -573,7 +573,7 @@ static BC_STATUS bc_cproc_add_cap_buff(struct crystalhd_cmd *ctx,
 	struct crystalhd_dio_req *dio_hnd = NULL;
 	BC_STATUS sts = BC_STS_SUCCESS;
 
-	if (!ctx || !idata) {
+	if (!ctx || !ctx->hw_ctx || !idata) {
 		dev_err(dev, "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -631,7 +631,7 @@ static BC_STATUS bc_cproc_fetch_frame(struct crystalhd_cmd *ctx,
 	BC_STATUS sts = BC_STS_SUCCESS;
 	BC_DEC_OUT_BUFF *frame;
 
-	if (!ctx || !idata) {
+	if (!ctx || !ctx->hw_ctx || !idata) {
 		dev_err(dev, "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -673,6 +673,10 @@ static BC_STATUS bc_cproc_fetch_frame(struct crystalhd_cmd *ctx,
 static BC_STATUS bc_cproc_start_capture(struct crystalhd_cmd *ctx,
 					crystalhd_ioctl_data *idata)
 {
+	if (!ctx || !ctx->hw_ctx || !idata) {
+		return BC_STS_INV_ARG;
+	}
+
 	ctx->state |= BC_LINK_CAP_EN;
 
 	if( idata->udata.u.RxCap.PauseThsh )
@@ -705,7 +709,7 @@ static BC_STATUS bc_cproc_flush_cap_buffs(struct crystalhd_cmd *ctx,
 	struct device *dev = chddev();
 	struct crystalhd_rx_dma_pkt *rpkt;
 
-	if (!ctx || !idata) {
+	if (!ctx || !ctx->hw_ctx || !idata) {
 		dev_err(dev, "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -745,7 +749,7 @@ static BC_STATUS bc_cproc_get_stats(struct crystalhd_cmd *ctx,
 	bool readTxOnly = false;
 	unsigned long irqflags;
 
-	if (!ctx || !idata) {
+	if (!ctx || !ctx->hw_ctx || !idata) {
 		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -948,9 +952,9 @@ BC_STATUS crystalhd_suspend(struct crystalhd_cmd *ctx, crystalhd_ioctl_data *ida
 	BC_STATUS sts = BC_STS_SUCCESS;
 	struct crystalhd_rx_dma_pkt *rpkt = NULL;
 
-	if (!ctx || !idata) {
-		dev_err(dev, "Invalid Parameters\n");
-		return BC_STS_ERROR;
+	if (!ctx || !ctx->hw_ctx || !idata) {
+		dev_err(dev, "%s: Invalid Arg\n", __func__);
+		return BC_STS_INV_ARG;
 	}
 
 	if (ctx->state & BC_LINK_SUSPEND)

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH] crystalhd git.linuxtv.org kernel driver: FIX kernel unhandled paging request BUG triggered by multithreaded or faulty apps
  2013-01-11  0:43       ` [BUG] crystalhd git.linuxtv.org kernel driver: Crashing again Linux, 3.2, using mozilla flashplugin from adobe thomas schorpp
  2013-01-25 21:38         ` [PATCH] crystalhd git.linuxtv.org kernel driver: FIX null pointer BUG in crystalhd_dioq_fetch_wait() on queue(s) overload thomas schorpp
  2013-02-01  1:52         ` [PATCH] crystalhd git.linuxtv.org kernel driver: FIX MORE null pointer BUGs triggered by multithreaded or faulty apps thomas schorpp
@ 2013-02-01 20:23         ` thomas schorpp
  2013-02-04 15:21         ` [PATCH] crystalhd git.linuxtv.org kernel driver: FIX kernel freeze or OOPS in ISRs thomas schorpp
  2013-02-08 13:59         ` [PATCH] crystalhd git.linuxtv.org kernel driver: Fix PM suspend broken by emergency patches thomas schorpp
  4 siblings, 0 replies; 11+ messages in thread
From: thomas schorpp @ 2013-02-01 20:23 UTC (permalink / raw)
  To: linux-media; +Cc: j, jarod, 699470

[-- Attachment #1: Type: text/plain, Size: 12036 bytes --]

This patch should pass the 3rd test case of this bug (kernel unhandled paging request) and maybe the PM resume issue, too:

21370-Feb  1 18:39:52 tom3 kernel: [59853.620636] crystalhd 0000:03:00.0: Opening new user[0] handle
21371-Feb  1 18:39:52 tom3 kernel: [59853.875306] crystalhd 0000:03:00.0: Closing user[0] handle with mode ffffffff
21372-Feb  1 18:39:52 tom3 kernel: [59854.079584] crystalhd 0000:03:00.0: Opening new user[0] handle
21373-Feb  1 18:39:52 tom3 kernel: [59854.079607] crystalhd 0000:03:00.0: Opening new user[0] handle
21374-Feb  1 18:39:52 tom3 kernel: [59854.079633] crystalhd 0000:03:00.0: Closing user[0] handle with mode ffffffff
21375-Feb  1 18:39:52 tom3 kernel: [59854.080022] crystalhd 0000:03:00.0: Opening new user[0] handle
21376:Feb  1 18:39:52 tom3 kernel: [59854.283228] BUG: unable to handle kernel paging request at 0000071e00000000
21377-Feb  1 18:39:52 tom3 kernel: [59854.283358] IP: [<0000071e00000000>] 0x71dffffffff
21378-Feb  1 18:39:52 tom3 kernel: [59854.283447] PGD 0
21379-Feb  1 18:39:52 tom3 kernel: [59854.283490] Oops: 0010 [#1] PREEMPT SMP
21380-Feb  1 18:39:52 tom3 kernel: [59854.283575] CPU 0
21381-Feb  1 18:39:52 tom3 kernel: [59854.283609] Modules linked in: crystalhd(O) nfs fscache uinput parport_pc ppdev lp parport bluetooth nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs acpi_cpufreq mperf cpufreq_powersave cpufreq_stats cpufreq_conservative cpufreq_performance cpufreq_ondemand freq_table fuse dm_mod ext3 jbd pciehp arc4 ath5k ath mac80211 snd_hda_codec_analog snd_hda_intel snd_hda_codec snd_usb_audio snd_pcm_oss cfg80211 thinkpad_acpi snd_mixer_oss snd_hwdep snd_pcm snd_usbmidi_lib snd_seq_dummy snd_seq_oss rfkill snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer pcmcia snd_seq_device gspca_zc3xx gspca_main snd yenta_socket psmouse pcmcia_rsrc videodev tpm_tis tpm tpm_bios v4l2_compat_ioctl32 pcmcia_core i2c_i801 nvram pcspkr usb_storage soundcore serio_raw snd_page_alloc rtc_cmos wmi ac battery processor evdev nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit xt_tcpudp iptable_filte
r ip_tables x_tables ext4 mbcach
21382-Feb  1 18:39:52 tom3 kernel: e jbd2 crc16 usbhid hid sg sr_mod sd_mod cdrom crc_t10dif ata_generic uhci_hcd ahci libahci xhci_hcd ata_piix libata ehci_hcd atkbd thermal e1000e usbcore usb_common [last unloaded: crystalhd]
21383-Feb  1 18:39:52 tom3 kernel: [59854.284016]
21384-Feb  1 18:39:52 tom3 kernel: [59854.284016] Pid: 12285, comm: matroskademux0: Tainted: G           O 3.2.37-dirty #8 LENOVO 7735Y1T/7735Y1T
21385-Feb  1 18:39:52 tom3 kernel: [59854.284016] RIP: 0010:[<0000071e00000000>]  [<0000071e00000000>] 0x71dffffffff
21386-Feb  1 18:39:52 tom3 kernel: [59854.284016] RSP: 0018:ffff8800164d3b50  EFLAGS: 00010292
21387-Feb  1 18:39:52 tom3 kernel: [59854.284016] RAX: 000000000000007f RBX: ffff880004b9a400 RCX: 0000000000000000
21388-Feb  1 18:39:52 tom3 kernel: [59854.284016] RDX: 0000000000000001 RSI: 0000000000340000 RDI: ffff88000f437400
21389-Feb  1 18:39:52 tom3 kernel: [59854.284016] RBP: ffff8800164d3b68 R08: 0000000000000001 R09: 0000000000000000
21390-Feb  1 18:39:52 tom3 kernel: [59854.284016] R10: 0000000000000000 R11: ffff8800084d86c0 R12: ffff88007c256090
21391-Feb  1 18:39:52 tom3 kernel: [59854.284016] R13: ffff88000f437400 R14: ffff88000f4374d0 R15: ffffffffa0489f20
21392-Feb  1 18:39:52 tom3 kernel: [59854.284016] FS:  00007f70d559c700(0000) GS:ffff88007f400000(0000) knlGS:0000000000000000
21393-Feb  1 18:39:52 tom3 kernel: [59854.284016] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
21394-Feb  1 18:39:52 tom3 kernel: [59854.284016] CR2: 0000071e00000000 CR3: 00000000339b1000 CR4: 00000000000006f0
21395-Feb  1 18:39:52 tom3 kernel: [59854.284016] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
21396-Feb  1 18:39:52 tom3 kernel: [59854.284016] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
21397-Feb  1 18:39:52 tom3 kernel: [59854.284016] Process matroskademux0: (pid: 12285, threadinfo ffff8800164d2000, task ffff8800084d8000)
21398-Feb  1 18:39:52 tom3 kernel: [59854.284016] Stack:
21399-Feb  1 18:39:52 tom3 kernel: [59854.284016]  ffffffffa047df98 ffff8800164d3b88 ffff880004b9a400 ffff8800164d3b88
21400-Feb  1 18:39:52 tom3 kernel: [59854.284016]  ffffffffa047e48b ffff880004b9a400 ffff88007c256090 ffff8800164d3bb8
21401-Feb  1 18:39:52 tom3 kernel: [59854.284016]  ffffffffa047c6fa 0000000000000000 ffff88000f4374c0 0000000000000000
21402-Feb  1 18:39:52 tom3 kernel: [59854.284016] Call Trace:
21403-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffffa047df98>] ? crystalhd_link_soft_rst+0x28/0x80 [crystalhd]
21404-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffffa047e48b>] crystalhd_link_start_device+0xcb/0x150 [crystalhd]
21405-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffffa047c6fa>] crystalhd_hw_open+0x23a/0x400 [crystalhd]
21406-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffffa047a760>] crystalhd_user_open+0x160/0x180 [crystalhd]
21407-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffff811621d4>] ? chrdev_open+0x64/0x290
21408-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffffa0476377>] chd_dec_open+0x67/0x110 [crystalhd]
21409-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffff811622c0>] chrdev_open+0x150/0x290
21410-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffff8115ee98>] ? files_lglock_local_unlock+0x48/0x70
21411-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffff81162170>] ? register_chrdev_region+0xc0/0xc0
21412-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffff8115c752>] __dentry_open+0x242/0x400
21413-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffff81493495>] ? _raw_spin_unlock+0x35/0x60
21414-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffff811f5120>] ? devcgroup_seq_read+0x150/0x150
21415-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffff8115ca11>] nameidata_to_filp+0x71/0x80
21416-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffff8116b4a8>] do_last+0x3f8/0x7f0
21417-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffff8116c9b5>] path_openat+0xd5/0x3c0
21418-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffff8116cdb9>] do_filp_open+0x49/0xa0
21419-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffff81493495>] ? _raw_spin_unlock+0x35/0x60
21420-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffff8117acda>] ? alloc_fd+0xfa/0x140
21421-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffff8115cc08>] do_sys_open+0x108/0x1f0
21422-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffff8115cd30>] sys_open+0x20/0x30
21423-Feb  1 18:39:52 tom3 kernel: [59854.284016]  [<ffffffff8149ad6b>] system_call_fastpath+0x16/0x1b
21424-Feb  1 18:39:52 tom3 kernel: [59854.284016] Code:  Bad RIP value.
21425-Feb  1 18:39:52 tom3 kernel: [59854.284016] RIP  [<0000071e00000000>] 0x71dffffffff
21426-Feb  1 18:39:52 tom3 kernel: [59854.284016]  RSP <ffff8800164d3b50>
21427-Feb  1 18:39:52 tom3 kernel: [59854.284016] CR2: 0000071e00000000
21428-Feb  1 18:39:52 tom3 kernel: [59854.342607] ---[ end trace f9fc7381abc03c15 ]---
21429-Feb  1 18:39:55 tom3 kernel: [59856.776490] start_capture: pause_th:12, resume_th:5
21430-Feb  1 18:39:55 tom3 kernel: [59856.927007] crystalhd 0000:03:00.0: [FMT CH] PIB:0 1 420 2 780 438 780 0 0 0
21431-Feb  1 18:39:55 tom3 kernel: [59857.031972] crystalhd 0000:03:00.0: MISSING 3 PICTURES
21432-Feb  1 19:25:07 tom3 kernel: [62569.274438] crystalhd 0000:03:00.0: Closing user[0] handle with mode 1c200
21433-Feb  1 19:25:15 tom3 kernel: [62576.649821] ------------[ cut here ]------------

Increased sys usage with totem with the patch could be a sign that something is wrong due to blocking pointer checks and debian stable

$ transmageddon
Traceback (most recent call last):
   File "transmageddon.py", line 676, in on_presetchoice_changed
     self.devicename= self.presetchoices[presetchoice]
KeyError: 'Keine Voreinstellungen'
Running DIL (3.22.0) Version
DtsDeviceOpen: Opening HW in mode 0
Clock set to 180
DtsDrvCmd Failed with status -1
DtsPushFwBinToLink: DeviceIoControl Failed
DtsPushAuthFwToLink: Failed to download firmware
DtsSetupHardware: Failed from Open
DtsGetDriveStats: Ioctl failed: 1
...
txThreadProc: Got status 1 from GetDriverStatus
DtsGetDriveStats: Ioctl failed: 1
txThreadProc: Got status 1 from GetDriverStatus
DtsAllocIoctlData Error
Unable to detach from Dil shared memory ...
DtsDelDilShMem:Unable get shmid ...
Stream with high frequencies VQ coding
/usr/bin/transmageddon: Zeile 3:  6692 Speicherzugriffsfehler  python transmageddon.py
schorpp@tom3:~$

Feb  1 20:21:44 tom3 kernel: [ 1900.117133] crystalhd 0000:03:00.0: Opening new user[0] handle
Feb  1 20:21:46 tom3 kernel: [ 1902.371194] start_capture: pause_th:12, resume_th:5
Feb  1 20:21:47 tom3 kernel: [ 1902.726493] crystalhd 0000:03:00.0: Closing user[0] handle via ioctl with mode 1c200
Feb  1 20:21:59 tom3 kernel: [ 1914.586429] crystalhd 0000:03:00.0: Opening new user[0] handle
Feb  1 20:21:59 tom3 kernel: [ 1914.841273] crystalhd 0000:03:00.0: Closing user[0] handle with mode ffffffff
Feb  1 20:21:59 tom3 kernel: [ 1915.045784] crystalhd 0000:03:00.0: Opening new user[0] handle
Feb  1 20:21:59 tom3 kernel: [ 1915.045988] crystalhd 0000:03:00.0: Opening new user[0] handle
Feb  1 20:21:59 tom3 kernel: [ 1915.046103] crystalhd 0000:03:00.0: Closing user[0] handle with mode ffffffff
Feb  1 20:21:59 tom3 kernel: [ 1915.046802] crystalhd 0000:03:00.0: Opening new user[0] handle
Feb  1 20:21:59 tom3 kernel: [ 1915.300288] crystalhd 0000:03:00.0: Closing user[0] handle with mode ffffffff
Feb  1 20:21:59 tom3 kernel: [ 1915.493945] crystalhd 0000:03:00.0: Invalid hw config.. otp not programmed
Feb  1 20:21:59 tom3 kernel: [ 1915.493955] crystalhd 0000:03:00.0: Firmware Download Failure!! - -1
Feb  1 20:21:59 tom3 kernel: [ 1915.505631] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg ctx,hw,data: 0x0 0xffff880079ecf0c0 0xffff880036e82c00
Feb  1 20:21:59 tom3 kernel: [ 1915.507970] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg ctx,hw,data: 0x0 0xffff880079ecf0c0 0xffff880036e82c00
...
Feb  1 20:22:00 tom3 kernel: [ 1915.589897] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg ctx,hw,data: 0x0 0xffff880079ecf0c0 0xffff880036e82c00
Feb  1 20:22:00 tom3 kernel: [ 1915.592526] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg ctx,hw,data: 0x0 0xffff880079ecf0c0 0xffff880036e82c00
Feb  1 20:22:00 tom3 kernel: [ 1915.594811] crystalhd 0000:03:00.0: bc_cproc_get_stats: Invalid Arg ctx,hw,data: 0x0 0xffff880079ecf0c0 0xffff880036e82c00
Feb  1 20:22:00 tom3 kernel: [ 1915.597345] crystalhd 0000:03:00.0: bc_cproc_flush_cap_buffs: Invalid Arg
Feb  1 20:22:00 tom3 kernel: [ 1915.602438] crystalhd 0000:03:00.0: Closing user[0] handle via ioctl with mode 1c200
Feb  1 20:22:00 tom3 kernel: [ 1915.602444] crystalhd_hw_stop_capture: Invalid Arguments
Feb  1 20:22:00 tom3 kernel: [ 1915.602448] crystalhd_hw_free_dma_rings: Invalid Arguments
Feb  1 20:22:00 tom3 kernel: [ 1915.602537] crystalhd_hw_close: Invalid Arguments
Feb  1 20:22:02 tom3 kernel: [ 1917.532285] matroskademux0:[6701]: segfault at 7fbc69548018 ip 00007fbc6ac044d2 sp 00007fbc4f7fd080 error 6 in libpthread-2.11.3.so[7fbc6abf7000+17000]

is still not working but not crashing my kernel anymore. totem, ffmpeg, mplayer tests passed.
Since none of the "maintainers" nor Broadcom corp. care or agree on a common codebase, I've no motivation to fix

21372-Feb  1 18:39:52 tom3 kernel: [59854.079584] crystalhd 0000:03:00.0: Opening new user[0] handle
21373-Feb  1 18:39:52 tom3 kernel: [59854.079607] crystalhd 0000:03:00.0: Opening new user[0] handle

or any more.

Future efforts should focus on the new kernel staging GPL driver.
--------------------------

Patch attached.

crystalhd git.linuxtv.org kernel driver: FIX kernel unhandled paging request BUG triggered by multithreaded or faulty apps

Signed-off-by: Thomas Schorpp <thomas.schorpp@gmail.com>

y
tom




[-- Attachment #2: crystalhd-paging-bugfix.schorpp.01.patch --]
[-- Type: text/x-diff, Size: 15897 bytes --]

diff --git a/driver/linux/crystalhd_cmds.c b/driver/linux/crystalhd_cmds.c
index cecd710..ba743df 100644
--- a/driver/linux/crystalhd_cmds.c
+++ b/driver/linux/crystalhd_cmds.c
@@ -32,6 +32,11 @@ static struct crystalhd_user *bc_cproc_get_uid(struct crystalhd_cmd *ctx)
 	struct crystalhd_user *user = NULL;
 	int i;
 
+	if (!ctx) {
+		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
+		return user;
+	}
+
 	for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
 		if (!ctx->user[i].in_use) {
 			user = &ctx->user[i];
@@ -46,6 +51,11 @@ int bc_get_userhandle_count(struct crystalhd_cmd *ctx)
 {
 	int i, count = 0;
 
+	if (!ctx) {
+		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
+		return BC_STS_INV_ARG;
+	}
+
 	for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
 		if (ctx->user[i].in_use)
 			count++;
@@ -154,7 +164,7 @@ static BC_STATUS bc_cproc_get_hwtype(struct crystalhd_cmd *ctx, crystalhd_ioctl_
 static BC_STATUS bc_cproc_reg_rd(struct crystalhd_cmd *ctx,
 				 crystalhd_ioctl_data *idata)
 {
-	if (!ctx || !idata)
+	if (!ctx || !ctx->hw_ctx || !idata)
 		return BC_STS_INV_ARG;
 	idata->udata.u.regAcc.Value = ctx->hw_ctx->pfnReadDevRegister(ctx->adp,
 					idata->udata.u.regAcc.Offset);
@@ -164,7 +174,7 @@ static BC_STATUS bc_cproc_reg_rd(struct crystalhd_cmd *ctx,
 static BC_STATUS bc_cproc_reg_wr(struct crystalhd_cmd *ctx,
 				 crystalhd_ioctl_data *idata)
 {
-	if (!ctx || !idata)
+	if (!ctx || !ctx->hw_ctx || !idata)
 		return BC_STS_INV_ARG;
 
 	ctx->hw_ctx->pfnWriteDevRegister(ctx->adp, idata->udata.u.regAcc.Offset,
@@ -176,7 +186,7 @@ static BC_STATUS bc_cproc_reg_wr(struct crystalhd_cmd *ctx,
 static BC_STATUS bc_cproc_link_reg_rd(struct crystalhd_cmd *ctx,
 				      crystalhd_ioctl_data *idata)
 {
-	if (!ctx || !idata)
+	if (!ctx || !ctx->hw_ctx || !idata)
 		return BC_STS_INV_ARG;
 
 	idata->udata.u.regAcc.Value = ctx->hw_ctx->pfnReadFPGARegister(ctx->adp,
@@ -187,7 +197,7 @@ static BC_STATUS bc_cproc_link_reg_rd(struct crystalhd_cmd *ctx,
 static BC_STATUS bc_cproc_link_reg_wr(struct crystalhd_cmd *ctx,
 				      crystalhd_ioctl_data *idata)
 {
-	if (!ctx || !idata)
+	if (!ctx || !ctx->hw_ctx || !idata)
 		return BC_STS_INV_ARG;
 
 	ctx->hw_ctx->pfnWriteFPGARegister(ctx->adp, idata->udata.u.regAcc.Offset,
@@ -201,7 +211,7 @@ static BC_STATUS bc_cproc_mem_rd(struct crystalhd_cmd *ctx,
 {
 	BC_STATUS sts = BC_STS_SUCCESS;
 
-	if (!ctx || !idata || !idata->add_cdata)
+	if (!ctx || !ctx->hw_ctx || !idata || !idata->add_cdata)
 		return BC_STS_INV_ARG;
 
 	if (idata->udata.u.devMem.NumDwords > (idata->add_cdata_sz / 4)) {
@@ -220,7 +230,7 @@ static BC_STATUS bc_cproc_mem_wr(struct crystalhd_cmd *ctx,
 {
 	BC_STATUS sts = BC_STS_SUCCESS;
 
-	if (!ctx || !idata || !idata->add_cdata)
+	if (!ctx || !ctx->hw_ctx || !idata || !idata->add_cdata)
 		return BC_STS_INV_ARG;
 
 	if (idata->udata.u.devMem.NumDwords > (idata->add_cdata_sz / 4)) {
@@ -307,7 +317,7 @@ static BC_STATUS bc_cproc_download_fw(struct crystalhd_cmd *ctx,
 
 	dev_dbg(chddev(), "Downloading FW\n");
 
-	if (!ctx || !idata || !idata->add_cdata || !idata->add_cdata_sz) {
+	if (!ctx || !ctx->hw_ctx || !idata || !idata->add_cdata || !idata->add_cdata_sz) {
 		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -350,7 +360,7 @@ static BC_STATUS bc_cproc_do_fw_cmd(struct crystalhd_cmd *ctx, crystalhd_ioctl_d
 	BC_STATUS sts;
 	uint32_t *cmd;
 
-	if (!(ctx->state & BC_LINK_INIT)) {
+	if ( !ctx || !idata || !(ctx->state & BC_LINK_INIT) || !ctx->hw_ctx) {
 		dev_dbg(dev, "Link invalid state do fw cmd %x \n", ctx->state);
 		return BC_STS_ERR_USAGE;
 	}
@@ -395,7 +405,7 @@ static void bc_proc_in_completion(struct crystalhd_dio_req *dio_hnd,
 		return;
 	}
 	if (sts == BC_STS_IO_USER_ABORT || sts == BC_STS_PWR_MGMT)
-		 return;
+		return;
 
 	dio_hnd->uinfo.comp_sts = sts;
 	dio_hnd->uinfo.ev_sts = 1;
@@ -407,6 +417,9 @@ static BC_STATUS bc_cproc_codein_sleep(struct crystalhd_cmd *ctx)
 	wait_queue_head_t sleep_ev;
 	int rc = 0;
 
+	if (!ctx)
+		return BC_STS_INV_ARG;
+
 	if (ctx->state & BC_LINK_SUSPEND)
 		return BC_STS_PWR_MGMT;
 
@@ -432,7 +445,7 @@ static BC_STATUS bc_cproc_hw_txdma(struct crystalhd_cmd *ctx,
 	wait_queue_head_t event;
 	int rc = 0;
 
-	if (!ctx || !idata || !dio) {
+	if (!ctx || !ctx->hw_ctx || !idata || !dio) {
 		dev_err(dev, "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -573,7 +586,7 @@ static BC_STATUS bc_cproc_add_cap_buff(struct crystalhd_cmd *ctx,
 	struct crystalhd_dio_req *dio_hnd = NULL;
 	BC_STATUS sts = BC_STS_SUCCESS;
 
-	if (!ctx || !idata) {
+	if (!ctx || !ctx->hw_ctx || !idata) {
 		dev_err(dev, "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -612,6 +625,11 @@ static BC_STATUS bc_cproc_fmt_change(struct crystalhd_cmd *ctx,
 {
 	BC_STATUS sts = BC_STS_SUCCESS;
 
+	if (!ctx || !dio) {
+		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
+		return BC_STS_INV_ARG;
+	}
+
 	sts = crystalhd_hw_add_cap_buffer(ctx->hw_ctx, dio, 0);
 	if (sts != BC_STS_SUCCESS)
 		return sts;
@@ -673,6 +691,10 @@ static BC_STATUS bc_cproc_fetch_frame(struct crystalhd_cmd *ctx,
 static BC_STATUS bc_cproc_start_capture(struct crystalhd_cmd *ctx,
 					crystalhd_ioctl_data *idata)
 {
+	if (!ctx || !ctx->hw_ctx || !idata) {
+		return BC_STS_INV_ARG;
+	}
+
 	ctx->state |= BC_LINK_CAP_EN;
 
 	if( idata->udata.u.RxCap.PauseThsh )
@@ -705,7 +727,7 @@ static BC_STATUS bc_cproc_flush_cap_buffs(struct crystalhd_cmd *ctx,
 	struct device *dev = chddev();
 	struct crystalhd_rx_dma_pkt *rpkt;
 
-	if (!ctx || !idata) {
+	if (!ctx || !ctx->hw_ctx || !idata) {
 		dev_err(dev, "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -745,8 +767,8 @@ static BC_STATUS bc_cproc_get_stats(struct crystalhd_cmd *ctx,
 	bool readTxOnly = false;
 	unsigned long irqflags;
 
-	if (!ctx || !idata) {
-		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
+	if (!ctx || !ctx->hw_ctx || !idata) {
+		dev_err(chddev(), "%s: Invalid Arg ctx,hw,data: 0x%lx 0x%lx 0x%lx\n", __func__, (uintptr_t)(ctx->hw_ctx), (uintptr_t)ctx, (uintptr_t)idata);
 		return BC_STS_INV_ARG;
 	}
 
@@ -828,6 +850,10 @@ get_out:
 static BC_STATUS bc_cproc_reset_stats(struct crystalhd_cmd *ctx,
 				      crystalhd_ioctl_data *idata)
 {
+	if (!ctx || !ctx->hw_ctx || !idata) {
+		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
+		return BC_STS_INV_ARG;
+	}
 	crystalhd_hw_stats(ctx->hw_ctx, NULL);
 
 	return BC_STS_SUCCESS;
@@ -948,9 +974,9 @@ BC_STATUS crystalhd_suspend(struct crystalhd_cmd *ctx, crystalhd_ioctl_data *ida
 	BC_STATUS sts = BC_STS_SUCCESS;
 	struct crystalhd_rx_dma_pkt *rpkt = NULL;
 
-	if (!ctx || !idata) {
-		dev_err(dev, "Invalid Parameters\n");
-		return BC_STS_ERROR;
+	if (!ctx || !ctx->hw_ctx || !idata) {
+		dev_err(dev, "%s: Invalid Arg\n", __func__);
+		return BC_STS_INV_ARG;
 	}
 
 	if (ctx->state & BC_LINK_SUSPEND)
@@ -1017,6 +1043,11 @@ BC_STATUS crystalhd_resume(struct crystalhd_cmd *ctx)
 {
 	BC_STATUS sts = BC_STS_SUCCESS;
 
+	if (!ctx) {
+		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
+		return BC_STS_INV_ARG;
+	}
+
 	sts = crystalhd_hw_resume(ctx->hw_ctx);
 	if (sts != BC_STS_SUCCESS)
 		return sts;
@@ -1049,13 +1080,13 @@ BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx,
 	struct crystalhd_user *uc;
 
 	if (!ctx || !user_ctx) {
-		dev_err(dev, "Invalid arg..\n");
+		dev_err(dev, "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
 
 	uc = bc_cproc_get_uid(ctx);
 	if (!uc) {
-		dev_info(dev, "No free user context...\n");
+		dev_info(dev, "%s No free user context.\n", __func__);
 		return BC_STS_BUSY;
 	}
 
@@ -1093,19 +1124,21 @@ BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx,
  *
  * Called at the time of driver load.
  */
-BC_STATUS __devinit crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
+BC_STATUS crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
 				    struct crystalhd_adp *adp)
 {
-	struct device *dev = &adp->pdev->dev;
+	struct device *dev;
 	int i = 0;
 
-	if (!ctx || !adp) {
-		dev_err(dev, "%s: Invalid arg\n", __func__);
+	if (!ctx || !adp || !adp->pdev) {
+		printk(KERN_ERR "%s: Invalid arg.\n", __func__);
 		return BC_STS_INV_ARG;
 	}
 
+	dev = &adp->pdev->dev;
+
 	if (ctx->adp)
-		dev_dbg(dev, "Resetting Cmd context delete missing..\n");
+		dev_dbg(dev, "Resetting Cmd context delete missing.\n");
 
 	ctx->adp = adp;
 	for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
@@ -1114,15 +1147,19 @@ BC_STATUS __devinit crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
 		ctx->user[i].mode = DTS_MODE_INV;
 	}
 
-	ctx->hw_ctx = (struct crystalhd_hw*)kmalloc(sizeof(struct crystalhd_hw), GFP_KERNEL);
-
-	memset(ctx->hw_ctx, 0, sizeof(struct crystalhd_hw));
+	if(ctx->hw_ctx == NULL) {
+		ctx->hw_ctx = (struct crystalhd_hw*)kmalloc(sizeof(struct crystalhd_hw), GFP_KERNEL);
+		if(ctx->hw_ctx != NULL)
+			memset(ctx->hw_ctx, 0, sizeof(struct crystalhd_hw));
+		else
+			return BC_STS_ERROR;
 
-	/*Open and Close the Hardware to put it in to sleep state*/
-	crystalhd_hw_open(ctx->hw_ctx, ctx->adp);
-	crystalhd_hw_close(ctx->hw_ctx, ctx->adp);
-	kfree(ctx->hw_ctx);
-	ctx->hw_ctx = NULL;
+		/*Open and Close the Hardware to put it in to sleep state*/
+		crystalhd_hw_open(ctx->hw_ctx, ctx->adp);
+		crystalhd_hw_close(ctx->hw_ctx, ctx->adp);
+		kfree(ctx->hw_ctx);
+		ctx->hw_ctx = NULL;
+	}
 
 	return BC_STS_SUCCESS;
 }
@@ -1136,10 +1173,15 @@ BC_STATUS __devinit crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
  *
  * Called at the time of driver un-load.
  */
-BC_STATUS __devexit crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx)
+BC_STATUS crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx)
 {
 	dev_dbg(chddev(), "Deleting Command context..\n");
 
+	if (!ctx) {
+		dev_err(chddev(), "%s: Invalid arg\n", __func__);
+		return BC_STS_INV_ARG;
+	}
+
 	ctx->adp = NULL;
 
 	return BC_STS_SUCCESS;
@@ -1165,8 +1207,8 @@ crystalhd_cmd_proc crystalhd_get_cmd_proc(struct crystalhd_cmd *ctx, uint32_t cm
 	crystalhd_cmd_proc cproc = NULL;
 	unsigned int i, tbl_sz;
 
-	if (!ctx) {
-		dev_err(dev, "Invalid arg.. Cmd[%d]\n", cmd);
+	if (!ctx || !uc) {
+		dev_err(dev, "Invalid arg. Cmd[%d]\n", cmd);
 		return NULL;
 	}
 
diff --git a/driver/linux/crystalhd_fleafuncs.c b/driver/linux/crystalhd_fleafuncs.c
index 1aa7115..f76d122 100644
--- a/driver/linux/crystalhd_fleafuncs.c
+++ b/driver/linux/crystalhd_fleafuncs.c
@@ -1344,7 +1344,9 @@ BCHP_SCRUB_CTRL_BI_CMAC_127_96		0x000f6018			CMAC Bits[127:96]
 bool crystalhd_flea_start_device(struct crystalhd_hw *hw)
 {
 	uint32_t	regVal	= 0;
-	bool		bRetVal = false;
+
+	if (!hw)
+		return false;
 
 	/*
 	-- Issue Core reset to bring in the default values in place
@@ -1430,7 +1432,7 @@ bool crystalhd_flea_start_device(struct crystalhd_hw *hw)
 
 	msleep_interruptible(1);
 
-	return bRetVal;
+	return true;
 }
 
 
diff --git a/driver/linux/crystalhd_hw.c b/driver/linux/crystalhd_hw.c
index cf8fefb..4ff488e 100644
--- a/driver/linux/crystalhd_hw.c
+++ b/driver/linux/crystalhd_hw.c
@@ -38,7 +38,7 @@
 BC_STATUS crystalhd_hw_open(struct crystalhd_hw *hw, struct crystalhd_adp *adp)
 {
 	struct device *dev;
-	if (!hw || !adp) {
+	if (!hw || !adp || !adp->pdev) {
 		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -110,7 +110,10 @@ BC_STATUS crystalhd_hw_open(struct crystalhd_hw *hw, struct crystalhd_adp *adp)
 	hw->rx_pkt_tag_seed = 0x70029070;
 
 	hw->stop_pending = 0;
-	hw->pfnStartDevice(hw);
+	if (!hw->pfnStartDevice(hw)) {
+		printk(KERN_ERR "%s: Failed to Start Device! \n", __func__);
+		return BC_STS_ERROR;
+	}
 	hw->dev_started = true;
 
 	dev_dbg(dev, "Opening HW. hw:0x%lx, hw->adp:0x%lx\n",
@@ -121,9 +124,9 @@ BC_STATUS crystalhd_hw_open(struct crystalhd_hw *hw, struct crystalhd_adp *adp)
 
 BC_STATUS crystalhd_hw_close(struct crystalhd_hw *hw, struct crystalhd_adp *adp)
 {
-	if (!hw) {
+	if (!hw || !adp) {
 		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
-		return BC_STS_SUCCESS;
+		return BC_STS_INV_ARG;
 	}
 
 	if (!hw->dev_started)
@@ -1047,8 +1050,8 @@ BC_STATUS crystalhd_hw_resume(struct crystalhd_hw *hw)
 	hw->rx_list_post_index = 0;
 	hw->tx_list_post_index = 0;
 
-	if (hw->pfnStartDevice(hw)) {
-		dev_info(&hw->adp->pdev->dev, "Failed to Start Device!!\n");
+	if (!hw->pfnStartDevice(hw)) {
+		dev_info(&hw->adp->pdev->dev, "Failed to resume start device!\n");
 		return BC_STS_ERROR;
 	}
 
diff --git a/driver/linux/crystalhd_linkfuncs.c b/driver/linux/crystalhd_linkfuncs.c
index 8366cc3..514e218 100644
--- a/driver/linux/crystalhd_linkfuncs.c
+++ b/driver/linux/crystalhd_linkfuncs.c
@@ -469,8 +469,8 @@ bool crystalhd_link_start_device(struct crystalhd_hw *hw)
 	uint32_t dbg_options, glb_cntrl = 0, reg_pwrmgmt = 0;
 	struct device *dev;
 
-	if (!hw)
-		return -EINVAL;
+	if (!hw || !hw->adp || !hw->adp->pdev)
+		return false;
 
 	dev = &hw->adp->pdev->dev;
 
diff --git a/driver/linux/crystalhd_lnx.c b/driver/linux/crystalhd_lnx.c
index 64e66ad..8608aea 100644
--- a/driver/linux/crystalhd_lnx.c
+++ b/driver/linux/crystalhd_lnx.c
@@ -431,7 +431,7 @@ static const struct file_operations chd_dec_fops = {
 	.llseek		= noop_llseek,
 };
 
-static int __devinit chd_dec_init_chdev(struct crystalhd_adp *adp)
+static int chd_dec_init_chdev(struct crystalhd_adp *adp)
 {
 	struct device *xdev = &adp->pdev->dev;
 	struct device *dev;
@@ -498,7 +498,7 @@ fail:
 	return rc;
 }
 
-static void __devexit chd_dec_release_chdev(struct crystalhd_adp *adp)
+static void chd_dec_release_chdev(struct crystalhd_adp *adp)
 {
 	crystalhd_ioctl_data *temp = NULL;
 	if (!adp)
@@ -523,7 +523,7 @@ static void __devexit chd_dec_release_chdev(struct crystalhd_adp *adp)
 	/*crystalhd_delete_elem_pool(adp); */
 }
 
-static int __devinit chd_pci_reserve_mem(struct crystalhd_adp *pinfo)
+static int chd_pci_reserve_mem(struct crystalhd_adp *pinfo)
 {
 	struct device *dev = &pinfo->pdev->dev;
 	int rc;
@@ -582,7 +582,7 @@ static int __devinit chd_pci_reserve_mem(struct crystalhd_adp *pinfo)
 	return 0;
 }
 
-static void __devexit chd_pci_release_mem(struct crystalhd_adp *pinfo)
+static void chd_pci_release_mem(struct crystalhd_adp *pinfo)
 {
 	if (!pinfo)
 		return;
@@ -597,7 +597,7 @@ static void __devexit chd_pci_release_mem(struct crystalhd_adp *pinfo)
 }
 
 
-static void __devexit chd_dec_pci_remove(struct pci_dev *pdev)
+static void chd_dec_pci_remove(struct pci_dev *pdev)
 {
 	struct crystalhd_adp *pinfo;
 	BC_STATUS sts = BC_STS_SUCCESS;
@@ -625,7 +625,7 @@ static void __devexit chd_dec_pci_remove(struct pci_dev *pdev)
 	g_adp_info = NULL;
 }
 
-static int __devinit chd_dec_pci_probe(struct pci_dev *pdev,
+static int chd_dec_pci_probe(struct pci_dev *pdev,
 			     const struct pci_device_id *entry)
 {
 	struct device *dev = &pdev->dev;
@@ -815,7 +815,7 @@ MODULE_DEVICE_TABLE(pci, chd_dec_pci_id_table);
 static struct pci_driver bc_chd_driver = {
 	.name     = "crystalhd",
 	.probe    = chd_dec_pci_probe,
-	.remove   = __devexit_p(chd_dec_pci_remove),
+	.remove   = chd_dec_pci_remove,
 	.id_table = chd_dec_pci_id_table,
 	.suspend  = chd_dec_pci_suspend,
 	.resume   = chd_dec_pci_resume
diff --git a/driver/linux/crystalhd_misc.c b/driver/linux/crystalhd_misc.c
index 410ab9d..56fbb51 100644
--- a/driver/linux/crystalhd_misc.c
+++ b/driver/linux/crystalhd_misc.c
@@ -512,8 +512,8 @@ void *crystalhd_dioq_fetch_wait(struct crystalhd_hw *hw, uint32_t to_secs, uint3
 			if(down_interruptible(&hw->fetch_sem))
 				goto sem_error;
 			r_pkt = crystalhd_dioq_fetch(ioq);
-			/* If format change packet, then return with out checking anything */
-			if (r_pkt->flags & (COMP_FLAG_PIB_VALID | COMP_FLAG_FMT_CHANGE))
+			/* If format change packet then return without checking anything */
+			if (!r_pkt || r_pkt->flags & (COMP_FLAG_PIB_VALID | COMP_FLAG_FMT_CHANGE))
 				goto sem_rel_return;
 			if (hw->adp->pdev->device == BC_PCI_DEVID_LINK) {
 				picYcomp = link_GetRptDropParam(hw, hw->PICHeight, hw->PICWidth, (void *)r_pkt);

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH] crystalhd git.linuxtv.org kernel driver: FIX kernel freeze or OOPS in ISRs
  2013-01-11  0:43       ` [BUG] crystalhd git.linuxtv.org kernel driver: Crashing again Linux, 3.2, using mozilla flashplugin from adobe thomas schorpp
                           ` (2 preceding siblings ...)
  2013-02-01 20:23         ` [PATCH] crystalhd git.linuxtv.org kernel driver: FIX kernel unhandled paging request BUG " thomas schorpp
@ 2013-02-04 15:21         ` thomas schorpp
  2013-02-08 13:59         ` [PATCH] crystalhd git.linuxtv.org kernel driver: Fix PM suspend broken by emergency patches thomas schorpp
  4 siblings, 0 replies; 11+ messages in thread
From: thomas schorpp @ 2013-02-04 15:21 UTC (permalink / raw)
  To: linux-media; +Cc: j, jarod, 699470

[-- Attachment #1: Type: text/plain, Size: 465 bytes --]

As expectable, the (unhandled?) false returns from the NULL pointer "fixes" may lead to kernel deadlock freezes and crashes in the ISRs.
Reproducing scenario: ctrl-c at capture startup, e.g.

Next try to fix it.

Future efforts should focus on the new kernel staging GPL driver.
--------------------------

Patch attached.

crystalhd git.linuxtv.org kernel driver: FIX kernel freeze or OOPS in ISRs

Signed-off-by: Thomas Schorpp <thomas.schorpp@gmail.com>

y
tom


[-- Attachment #2: crystalhd-isr-deadlock-bugfix.schorpp.01.patch --]
[-- Type: text/x-diff, Size: 18356 bytes --]

diff --git a/driver/linux/crystalhd_cmds.c b/driver/linux/crystalhd_cmds.c
index cecd710..ba743df 100644
--- a/driver/linux/crystalhd_cmds.c
+++ b/driver/linux/crystalhd_cmds.c
@@ -32,6 +32,11 @@ static struct crystalhd_user *bc_cproc_get_uid(struct crystalhd_cmd *ctx)
 	struct crystalhd_user *user = NULL;
 	int i;
 
+	if (!ctx) {
+		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
+		return user;
+	}
+
 	for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
 		if (!ctx->user[i].in_use) {
 			user = &ctx->user[i];
@@ -46,6 +51,11 @@ int bc_get_userhandle_count(struct crystalhd_cmd *ctx)
 {
 	int i, count = 0;
 
+	if (!ctx) {
+		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
+		return BC_STS_INV_ARG;
+	}
+
 	for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
 		if (ctx->user[i].in_use)
 			count++;
@@ -154,7 +164,7 @@ static BC_STATUS bc_cproc_get_hwtype(struct crystalhd_cmd *ctx, crystalhd_ioctl_
 static BC_STATUS bc_cproc_reg_rd(struct crystalhd_cmd *ctx,
 				 crystalhd_ioctl_data *idata)
 {
-	if (!ctx || !idata)
+	if (!ctx || !ctx->hw_ctx || !idata)
 		return BC_STS_INV_ARG;
 	idata->udata.u.regAcc.Value = ctx->hw_ctx->pfnReadDevRegister(ctx->adp,
 					idata->udata.u.regAcc.Offset);
@@ -164,7 +174,7 @@ static BC_STATUS bc_cproc_reg_rd(struct crystalhd_cmd *ctx,
 static BC_STATUS bc_cproc_reg_wr(struct crystalhd_cmd *ctx,
 				 crystalhd_ioctl_data *idata)
 {
-	if (!ctx || !idata)
+	if (!ctx || !ctx->hw_ctx || !idata)
 		return BC_STS_INV_ARG;
 
 	ctx->hw_ctx->pfnWriteDevRegister(ctx->adp, idata->udata.u.regAcc.Offset,
@@ -176,7 +186,7 @@ static BC_STATUS bc_cproc_reg_wr(struct crystalhd_cmd *ctx,
 static BC_STATUS bc_cproc_link_reg_rd(struct crystalhd_cmd *ctx,
 				      crystalhd_ioctl_data *idata)
 {
-	if (!ctx || !idata)
+	if (!ctx || !ctx->hw_ctx || !idata)
 		return BC_STS_INV_ARG;
 
 	idata->udata.u.regAcc.Value = ctx->hw_ctx->pfnReadFPGARegister(ctx->adp,
@@ -187,7 +197,7 @@ static BC_STATUS bc_cproc_link_reg_rd(struct crystalhd_cmd *ctx,
 static BC_STATUS bc_cproc_link_reg_wr(struct crystalhd_cmd *ctx,
 				      crystalhd_ioctl_data *idata)
 {
-	if (!ctx || !idata)
+	if (!ctx || !ctx->hw_ctx || !idata)
 		return BC_STS_INV_ARG;
 
 	ctx->hw_ctx->pfnWriteFPGARegister(ctx->adp, idata->udata.u.regAcc.Offset,
@@ -201,7 +211,7 @@ static BC_STATUS bc_cproc_mem_rd(struct crystalhd_cmd *ctx,
 {
 	BC_STATUS sts = BC_STS_SUCCESS;
 
-	if (!ctx || !idata || !idata->add_cdata)
+	if (!ctx || !ctx->hw_ctx || !idata || !idata->add_cdata)
 		return BC_STS_INV_ARG;
 
 	if (idata->udata.u.devMem.NumDwords > (idata->add_cdata_sz / 4)) {
@@ -220,7 +230,7 @@ static BC_STATUS bc_cproc_mem_wr(struct crystalhd_cmd *ctx,
 {
 	BC_STATUS sts = BC_STS_SUCCESS;
 
-	if (!ctx || !idata || !idata->add_cdata)
+	if (!ctx || !ctx->hw_ctx || !idata || !idata->add_cdata)
 		return BC_STS_INV_ARG;
 
 	if (idata->udata.u.devMem.NumDwords > (idata->add_cdata_sz / 4)) {
@@ -307,7 +317,7 @@ static BC_STATUS bc_cproc_download_fw(struct crystalhd_cmd *ctx,
 
 	dev_dbg(chddev(), "Downloading FW\n");
 
-	if (!ctx || !idata || !idata->add_cdata || !idata->add_cdata_sz) {
+	if (!ctx || !ctx->hw_ctx || !idata || !idata->add_cdata || !idata->add_cdata_sz) {
 		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -350,7 +360,7 @@ static BC_STATUS bc_cproc_do_fw_cmd(struct crystalhd_cmd *ctx, crystalhd_ioctl_d
 	BC_STATUS sts;
 	uint32_t *cmd;
 
-	if (!(ctx->state & BC_LINK_INIT)) {
+	if ( !ctx || !idata || !(ctx->state & BC_LINK_INIT) || !ctx->hw_ctx) {
 		dev_dbg(dev, "Link invalid state do fw cmd %x \n", ctx->state);
 		return BC_STS_ERR_USAGE;
 	}
@@ -395,7 +405,7 @@ static void bc_proc_in_completion(struct crystalhd_dio_req *dio_hnd,
 		return;
 	}
 	if (sts == BC_STS_IO_USER_ABORT || sts == BC_STS_PWR_MGMT)
-		 return;
+		return;
 
 	dio_hnd->uinfo.comp_sts = sts;
 	dio_hnd->uinfo.ev_sts = 1;
@@ -407,6 +417,9 @@ static BC_STATUS bc_cproc_codein_sleep(struct crystalhd_cmd *ctx)
 	wait_queue_head_t sleep_ev;
 	int rc = 0;
 
+	if (!ctx)
+		return BC_STS_INV_ARG;
+
 	if (ctx->state & BC_LINK_SUSPEND)
 		return BC_STS_PWR_MGMT;
 
@@ -432,7 +445,7 @@ static BC_STATUS bc_cproc_hw_txdma(struct crystalhd_cmd *ctx,
 	wait_queue_head_t event;
 	int rc = 0;
 
-	if (!ctx || !idata || !dio) {
+	if (!ctx || !ctx->hw_ctx || !idata || !dio) {
 		dev_err(dev, "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -573,7 +586,7 @@ static BC_STATUS bc_cproc_add_cap_buff(struct crystalhd_cmd *ctx,
 	struct crystalhd_dio_req *dio_hnd = NULL;
 	BC_STATUS sts = BC_STS_SUCCESS;
 
-	if (!ctx || !idata) {
+	if (!ctx || !ctx->hw_ctx || !idata) {
 		dev_err(dev, "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -612,6 +625,11 @@ static BC_STATUS bc_cproc_fmt_change(struct crystalhd_cmd *ctx,
 {
 	BC_STATUS sts = BC_STS_SUCCESS;
 
+	if (!ctx || !dio) {
+		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
+		return BC_STS_INV_ARG;
+	}
+
 	sts = crystalhd_hw_add_cap_buffer(ctx->hw_ctx, dio, 0);
 	if (sts != BC_STS_SUCCESS)
 		return sts;
@@ -673,6 +691,10 @@ static BC_STATUS bc_cproc_fetch_frame(struct crystalhd_cmd *ctx,
 static BC_STATUS bc_cproc_start_capture(struct crystalhd_cmd *ctx,
 					crystalhd_ioctl_data *idata)
 {
+	if (!ctx || !ctx->hw_ctx || !idata) {
+		return BC_STS_INV_ARG;
+	}
+
 	ctx->state |= BC_LINK_CAP_EN;
 
 	if( idata->udata.u.RxCap.PauseThsh )
@@ -705,7 +727,7 @@ static BC_STATUS bc_cproc_flush_cap_buffs(struct crystalhd_cmd *ctx,
 	struct device *dev = chddev();
 	struct crystalhd_rx_dma_pkt *rpkt;
 
-	if (!ctx || !idata) {
+	if (!ctx || !ctx->hw_ctx || !idata) {
 		dev_err(dev, "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -745,8 +767,8 @@ static BC_STATUS bc_cproc_get_stats(struct crystalhd_cmd *ctx,
 	bool readTxOnly = false;
 	unsigned long irqflags;
 
-	if (!ctx || !idata) {
-		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
+	if (!ctx || !ctx->hw_ctx || !idata) {
+		dev_err(chddev(), "%s: Invalid Arg ctx,hw,data: 0x%lx 0x%lx 0x%lx\n", __func__, (uintptr_t)(ctx->hw_ctx), (uintptr_t)ctx, (uintptr_t)idata);
 		return BC_STS_INV_ARG;
 	}
 
@@ -828,6 +850,10 @@ get_out:
 static BC_STATUS bc_cproc_reset_stats(struct crystalhd_cmd *ctx,
 				      crystalhd_ioctl_data *idata)
 {
+	if (!ctx || !ctx->hw_ctx || !idata) {
+		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
+		return BC_STS_INV_ARG;
+	}
 	crystalhd_hw_stats(ctx->hw_ctx, NULL);
 
 	return BC_STS_SUCCESS;
@@ -948,9 +974,9 @@ BC_STATUS crystalhd_suspend(struct crystalhd_cmd *ctx, crystalhd_ioctl_data *ida
 	BC_STATUS sts = BC_STS_SUCCESS;
 	struct crystalhd_rx_dma_pkt *rpkt = NULL;
 
-	if (!ctx || !idata) {
-		dev_err(dev, "Invalid Parameters\n");
-		return BC_STS_ERROR;
+	if (!ctx || !ctx->hw_ctx || !idata) {
+		dev_err(dev, "%s: Invalid Arg\n", __func__);
+		return BC_STS_INV_ARG;
 	}
 
 	if (ctx->state & BC_LINK_SUSPEND)
@@ -1017,6 +1043,11 @@ BC_STATUS crystalhd_resume(struct crystalhd_cmd *ctx)
 {
 	BC_STATUS sts = BC_STS_SUCCESS;
 
+	if (!ctx) {
+		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
+		return BC_STS_INV_ARG;
+	}
+
 	sts = crystalhd_hw_resume(ctx->hw_ctx);
 	if (sts != BC_STS_SUCCESS)
 		return sts;
@@ -1049,13 +1080,13 @@ BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx,
 	struct crystalhd_user *uc;
 
 	if (!ctx || !user_ctx) {
-		dev_err(dev, "Invalid arg..\n");
+		dev_err(dev, "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
 
 	uc = bc_cproc_get_uid(ctx);
 	if (!uc) {
-		dev_info(dev, "No free user context...\n");
+		dev_info(dev, "%s No free user context.\n", __func__);
 		return BC_STS_BUSY;
 	}
 
@@ -1093,19 +1124,21 @@ BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx,
  *
  * Called at the time of driver load.
  */
-BC_STATUS __devinit crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
+BC_STATUS crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
 				    struct crystalhd_adp *adp)
 {
-	struct device *dev = &adp->pdev->dev;
+	struct device *dev;
 	int i = 0;
 
-	if (!ctx || !adp) {
-		dev_err(dev, "%s: Invalid arg\n", __func__);
+	if (!ctx || !adp || !adp->pdev) {
+		printk(KERN_ERR "%s: Invalid arg.\n", __func__);
 		return BC_STS_INV_ARG;
 	}
 
+	dev = &adp->pdev->dev;
+
 	if (ctx->adp)
-		dev_dbg(dev, "Resetting Cmd context delete missing..\n");
+		dev_dbg(dev, "Resetting Cmd context delete missing.\n");
 
 	ctx->adp = adp;
 	for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
@@ -1114,15 +1147,19 @@ BC_STATUS __devinit crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
 		ctx->user[i].mode = DTS_MODE_INV;
 	}
 
-	ctx->hw_ctx = (struct crystalhd_hw*)kmalloc(sizeof(struct crystalhd_hw), GFP_KERNEL);
-
-	memset(ctx->hw_ctx, 0, sizeof(struct crystalhd_hw));
+	if(ctx->hw_ctx == NULL) {
+		ctx->hw_ctx = (struct crystalhd_hw*)kmalloc(sizeof(struct crystalhd_hw), GFP_KERNEL);
+		if(ctx->hw_ctx != NULL)
+			memset(ctx->hw_ctx, 0, sizeof(struct crystalhd_hw));
+		else
+			return BC_STS_ERROR;
 
-	/*Open and Close the Hardware to put it in to sleep state*/
-	crystalhd_hw_open(ctx->hw_ctx, ctx->adp);
-	crystalhd_hw_close(ctx->hw_ctx, ctx->adp);
-	kfree(ctx->hw_ctx);
-	ctx->hw_ctx = NULL;
+		/*Open and Close the Hardware to put it in to sleep state*/
+		crystalhd_hw_open(ctx->hw_ctx, ctx->adp);
+		crystalhd_hw_close(ctx->hw_ctx, ctx->adp);
+		kfree(ctx->hw_ctx);
+		ctx->hw_ctx = NULL;
+	}
 
 	return BC_STS_SUCCESS;
 }
@@ -1136,10 +1173,15 @@ BC_STATUS __devinit crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
  *
  * Called at the time of driver un-load.
  */
-BC_STATUS __devexit crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx)
+BC_STATUS crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx)
 {
 	dev_dbg(chddev(), "Deleting Command context..\n");
 
+	if (!ctx) {
+		dev_err(chddev(), "%s: Invalid arg\n", __func__);
+		return BC_STS_INV_ARG;
+	}
+
 	ctx->adp = NULL;
 
 	return BC_STS_SUCCESS;
@@ -1165,8 +1207,8 @@ crystalhd_cmd_proc crystalhd_get_cmd_proc(struct crystalhd_cmd *ctx, uint32_t cm
 	crystalhd_cmd_proc cproc = NULL;
 	unsigned int i, tbl_sz;
 
-	if (!ctx) {
-		dev_err(dev, "Invalid arg.. Cmd[%d]\n", cmd);
+	if (!ctx || !uc) {
+		dev_err(dev, "Invalid arg. Cmd[%d]\n", cmd);
 		return NULL;
 	}
 
diff --git a/driver/linux/crystalhd_fleafuncs.c b/driver/linux/crystalhd_fleafuncs.c
index 1aa7115..f76d122 100644
--- a/driver/linux/crystalhd_fleafuncs.c
+++ b/driver/linux/crystalhd_fleafuncs.c
@@ -1344,7 +1344,9 @@ BCHP_SCRUB_CTRL_BI_CMAC_127_96		0x000f6018			CMAC Bits[127:96]
 bool crystalhd_flea_start_device(struct crystalhd_hw *hw)
 {
 	uint32_t	regVal	= 0;
-	bool		bRetVal = false;
+
+	if (!hw)
+		return false;
 
 	/*
 	-- Issue Core reset to bring in the default values in place
@@ -1430,7 +1432,7 @@ bool crystalhd_flea_start_device(struct crystalhd_hw *hw)
 
 	msleep_interruptible(1);
 
-	return bRetVal;
+	return true;
 }
 
 
diff --git a/driver/linux/crystalhd_hw.c b/driver/linux/crystalhd_hw.c
index cf8fefb..bffb468 100644
--- a/driver/linux/crystalhd_hw.c
+++ b/driver/linux/crystalhd_hw.c
@@ -38,7 +38,7 @@
 BC_STATUS crystalhd_hw_open(struct crystalhd_hw *hw, struct crystalhd_adp *adp)
 {
 	struct device *dev;
-	if (!hw || !adp) {
+	if (!hw || !adp || !adp->pdev) {
 		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -110,7 +110,10 @@ BC_STATUS crystalhd_hw_open(struct crystalhd_hw *hw, struct crystalhd_adp *adp)
 	hw->rx_pkt_tag_seed = 0x70029070;
 
 	hw->stop_pending = 0;
-	hw->pfnStartDevice(hw);
+	if (!hw->pfnStartDevice(hw)) {
+		printk(KERN_ERR "%s: Failed to Start Device! \n", __func__);
+		return BC_STS_ERROR;
+	}
 	hw->dev_started = true;
 
 	dev_dbg(dev, "Opening HW. hw:0x%lx, hw->adp:0x%lx\n",
@@ -121,9 +124,9 @@ BC_STATUS crystalhd_hw_open(struct crystalhd_hw *hw, struct crystalhd_adp *adp)
 
 BC_STATUS crystalhd_hw_close(struct crystalhd_hw *hw, struct crystalhd_adp *adp)
 {
-	if (!hw) {
+	if (!hw || !adp) {
 		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
-		return BC_STS_SUCCESS;
+		return BC_STS_INV_ARG;
 	}
 
 	if (!hw->dev_started)
@@ -390,12 +393,12 @@ BC_STATUS crystalhd_hw_tx_req_complete(struct crystalhd_hw *hw,
 	struct tx_dma_pkt *tx_req;
 
 	if (!hw || !list_id) {
-		printk(KERN_ERR "%s: Invalid Arg!!\n", __func__);
+		printk(KERN_ERR "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
 
 	tx_req = (struct tx_dma_pkt *)crystalhd_dioq_find_and_fetch(hw->tx_actq, list_id);
-	if (!tx_req) {
+	if (!tx_req || !tx_req->dio_req || !tx_req->cb_event) {
 		if (cs != BC_STS_IO_USER_ABORT)
 			dev_err(&hw->adp->pdev->dev, "Find/Fetch: no req!\n");
 		return BC_STS_NO_DATA;
@@ -1047,8 +1050,8 @@ BC_STATUS crystalhd_hw_resume(struct crystalhd_hw *hw)
 	hw->rx_list_post_index = 0;
 	hw->tx_list_post_index = 0;
 
-	if (hw->pfnStartDevice(hw)) {
-		dev_info(&hw->adp->pdev->dev, "Failed to Start Device!!\n");
+	if (!hw->pfnStartDevice(hw)) {
+		dev_info(&hw->adp->pdev->dev, "Failed to resume start device!\n");
 		return BC_STS_ERROR;
 	}
 
diff --git a/driver/linux/crystalhd_linkfuncs.c b/driver/linux/crystalhd_linkfuncs.c
index 8366cc3..c8be3ab 100644
--- a/driver/linux/crystalhd_linkfuncs.c
+++ b/driver/linux/crystalhd_linkfuncs.c
@@ -469,8 +469,8 @@ bool crystalhd_link_start_device(struct crystalhd_hw *hw)
 	uint32_t dbg_options, glb_cntrl = 0, reg_pwrmgmt = 0;
 	struct device *dev;
 
-	if (!hw)
-		return -EINVAL;
+	if (!hw || !hw->adp || !hw->adp->pdev)
+		return false;
 
 	dev = &hw->adp->pdev->dev;
 
@@ -957,6 +957,9 @@ void crystalhd_link_tx_isr(struct crystalhd_hw *hw, uint32_t int_sts)
 {
 	uint32_t err_sts;
 
+	if (!hw)
+		return;
+
 	if (int_sts & INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_MASK)
 		crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 0,
 					   BC_STS_SUCCESS);
@@ -1995,22 +1998,15 @@ bool crystalhd_link_hw_interrupt_handle(struct crystalhd_adp *adp, struct crysta
 {
 	uint32_t intr_sts = 0;
 	uint32_t deco_intr = 0;
-	bool rc = false;
 
-	if (!adp || !hw->dev_started)
-		return rc;
+	if (!adp || !hw || !hw->dev_started)
+		return false;
 
 	hw->stats.num_interrupts++;
 
 	deco_intr = hw->pfnReadDevRegister(hw->adp, Stream2Host_Intr_Sts);
 	intr_sts  = hw->pfnReadFPGARegister(hw->adp, INTR_INTR_STATUS);
 
-	if (intr_sts) {
-		/* let system know we processed interrupt..*/
-		rc = true;
-		hw->stats.dev_interrupts++;
-	}
-
 	if (deco_intr && (deco_intr != 0xdeaddead)) {
 
 		if (deco_intr & 0x80000000) {
@@ -2026,7 +2022,6 @@ bool crystalhd_link_hw_interrupt_handle(struct crystalhd_adp *adp, struct crysta
 
 		hw->pfnWriteDevRegister(hw->adp, Stream2Host_Intr_Sts, deco_intr);
 		hw->pfnWriteDevRegister(hw->adp, Stream2Host_Intr_Sts, 0);
-		rc = 1;
 	}
 
 	/* Rx interrupts */
@@ -2036,14 +2031,17 @@ bool crystalhd_link_hw_interrupt_handle(struct crystalhd_adp *adp, struct crysta
 	crystalhd_link_tx_isr(hw, intr_sts);
 
 	/* Clear interrupts */
-	if (rc) {
-		if (intr_sts)
-			hw->pfnWriteFPGARegister(hw->adp, INTR_INTR_CLR_REG, intr_sts);
+	if (intr_sts)
+		hw->pfnWriteFPGARegister(hw->adp, INTR_INTR_CLR_REG, intr_sts);
 
-		hw->pfnWriteFPGARegister(hw->adp, INTR_EOI_CTRL, 1);
+	hw->pfnWriteFPGARegister(hw->adp, INTR_EOI_CTRL, 1);
+
+	if (intr_sts) {
+		/* Let system know we have processed interrupts, and rc ret is always true unless invalid args. */
+		hw->stats.dev_interrupts++;
 	}
 
-	return rc;
+	return true;
 }
 
 /* Dummy private function */
diff --git a/driver/linux/crystalhd_lnx.c b/driver/linux/crystalhd_lnx.c
index 64e66ad..8608aea 100644
--- a/driver/linux/crystalhd_lnx.c
+++ b/driver/linux/crystalhd_lnx.c
@@ -431,7 +431,7 @@ static const struct file_operations chd_dec_fops = {
 	.llseek		= noop_llseek,
 };
 
-static int __devinit chd_dec_init_chdev(struct crystalhd_adp *adp)
+static int chd_dec_init_chdev(struct crystalhd_adp *adp)
 {
 	struct device *xdev = &adp->pdev->dev;
 	struct device *dev;
@@ -498,7 +498,7 @@ fail:
 	return rc;
 }
 
-static void __devexit chd_dec_release_chdev(struct crystalhd_adp *adp)
+static void chd_dec_release_chdev(struct crystalhd_adp *adp)
 {
 	crystalhd_ioctl_data *temp = NULL;
 	if (!adp)
@@ -523,7 +523,7 @@ static void __devexit chd_dec_release_chdev(struct crystalhd_adp *adp)
 	/*crystalhd_delete_elem_pool(adp); */
 }
 
-static int __devinit chd_pci_reserve_mem(struct crystalhd_adp *pinfo)
+static int chd_pci_reserve_mem(struct crystalhd_adp *pinfo)
 {
 	struct device *dev = &pinfo->pdev->dev;
 	int rc;
@@ -582,7 +582,7 @@ static int __devinit chd_pci_reserve_mem(struct crystalhd_adp *pinfo)
 	return 0;
 }
 
-static void __devexit chd_pci_release_mem(struct crystalhd_adp *pinfo)
+static void chd_pci_release_mem(struct crystalhd_adp *pinfo)
 {
 	if (!pinfo)
 		return;
@@ -597,7 +597,7 @@ static void __devexit chd_pci_release_mem(struct crystalhd_adp *pinfo)
 }
 
 
-static void __devexit chd_dec_pci_remove(struct pci_dev *pdev)
+static void chd_dec_pci_remove(struct pci_dev *pdev)
 {
 	struct crystalhd_adp *pinfo;
 	BC_STATUS sts = BC_STS_SUCCESS;
@@ -625,7 +625,7 @@ static void __devexit chd_dec_pci_remove(struct pci_dev *pdev)
 	g_adp_info = NULL;
 }
 
-static int __devinit chd_dec_pci_probe(struct pci_dev *pdev,
+static int chd_dec_pci_probe(struct pci_dev *pdev,
 			     const struct pci_device_id *entry)
 {
 	struct device *dev = &pdev->dev;
@@ -815,7 +815,7 @@ MODULE_DEVICE_TABLE(pci, chd_dec_pci_id_table);
 static struct pci_driver bc_chd_driver = {
 	.name     = "crystalhd",
 	.probe    = chd_dec_pci_probe,
-	.remove   = __devexit_p(chd_dec_pci_remove),
+	.remove   = chd_dec_pci_remove,
 	.id_table = chd_dec_pci_id_table,
 	.suspend  = chd_dec_pci_suspend,
 	.resume   = chd_dec_pci_resume
diff --git a/driver/linux/crystalhd_misc.c b/driver/linux/crystalhd_misc.c
index 410ab9d..56fbb51 100644
--- a/driver/linux/crystalhd_misc.c
+++ b/driver/linux/crystalhd_misc.c
@@ -512,8 +512,8 @@ void *crystalhd_dioq_fetch_wait(struct crystalhd_hw *hw, uint32_t to_secs, uint3
 			if(down_interruptible(&hw->fetch_sem))
 				goto sem_error;
 			r_pkt = crystalhd_dioq_fetch(ioq);
-			/* If format change packet, then return with out checking anything */
-			if (r_pkt->flags & (COMP_FLAG_PIB_VALID | COMP_FLAG_FMT_CHANGE))
+			/* If format change packet then return without checking anything */
+			if (!r_pkt || r_pkt->flags & (COMP_FLAG_PIB_VALID | COMP_FLAG_FMT_CHANGE))
 				goto sem_rel_return;
 			if (hw->adp->pdev->device == BC_PCI_DEVID_LINK) {
 				picYcomp = link_GetRptDropParam(hw, hw->PICHeight, hw->PICWidth, (void *)r_pkt);

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH] crystalhd git.linuxtv.org kernel driver: Fix PM suspend broken by emergency patches
  2013-01-11  0:43       ` [BUG] crystalhd git.linuxtv.org kernel driver: Crashing again Linux, 3.2, using mozilla flashplugin from adobe thomas schorpp
                           ` (3 preceding siblings ...)
  2013-02-04 15:21         ` [PATCH] crystalhd git.linuxtv.org kernel driver: FIX kernel freeze or OOPS in ISRs thomas schorpp
@ 2013-02-08 13:59         ` thomas schorpp
  4 siblings, 0 replies; 11+ messages in thread
From: thomas schorpp @ 2013-02-08 13:59 UTC (permalink / raw)
  To: linux-media; +Cc: j, jarod, 699470

[-- Attachment #1: Type: text/plain, Size: 994 bytes --]

Fix PM suspend() broken by emergency patches, thanks to Philip Langdale for pointing out.

...But PM resume() didn't work anyway with the original code, always err invalid args.

Recommended workaround user space PM handling for ACPI S3:

/etc/pm/config.d/00suspend_modules:2:SUSPEND_MODULES="dvb_ttpci crystalhd"

/etc/pm/sleep.d/92_crystalhd
#!/bin/sh

#SERVICES="crystalhd"

#for service in $SERVICES; do
#    services_reverse="$service $services_reverse"
#done

case "$1" in
     hibernate|suspend)
         ;;
     thaw|resume)
     echo 1 > /sys/devices/pci0000:00/0000:00:1c.1/0000:02:00.0/reset
#    echo 1 > /sys/devices/pci0000:00/0000:00:1c.1/0000:02:00.0/rescan
esac

and after malfunction with "FW Command T/O", etc, crystalhd PCI-E device needs the reset up to 3x and module reload.

--------------------------

Patch attached.

crystalhd git.linuxtv.org kernel driver: Fix PM suspend broken by emergency patches

Signed-off-by: Thomas Schorpp <thomas.schorpp@gmail.com>

y
tom



[-- Attachment #2: crystalhd-fix-PM-suspend.schorpp.01.patch --]
[-- Type: text/x-diff, Size: 19008 bytes --]

diff --git a/driver/linux/crystalhd_cmds.c b/driver/linux/crystalhd_cmds.c
index cecd710..cb6e65d 100644
--- a/driver/linux/crystalhd_cmds.c
+++ b/driver/linux/crystalhd_cmds.c
@@ -32,6 +32,11 @@ static struct crystalhd_user *bc_cproc_get_uid(struct crystalhd_cmd *ctx)
 	struct crystalhd_user *user = NULL;
 	int i;
 
+	if (!ctx) {
+		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
+		return user;
+	}
+
 	for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
 		if (!ctx->user[i].in_use) {
 			user = &ctx->user[i];
@@ -46,6 +51,11 @@ int bc_get_userhandle_count(struct crystalhd_cmd *ctx)
 {
 	int i, count = 0;
 
+	if (!ctx) {
+		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
+		return BC_STS_INV_ARG;
+	}
+
 	for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
 		if (ctx->user[i].in_use)
 			count++;
@@ -154,7 +164,7 @@ static BC_STATUS bc_cproc_get_hwtype(struct crystalhd_cmd *ctx, crystalhd_ioctl_
 static BC_STATUS bc_cproc_reg_rd(struct crystalhd_cmd *ctx,
 				 crystalhd_ioctl_data *idata)
 {
-	if (!ctx || !idata)
+	if (!ctx || !ctx->hw_ctx || !idata)
 		return BC_STS_INV_ARG;
 	idata->udata.u.regAcc.Value = ctx->hw_ctx->pfnReadDevRegister(ctx->adp,
 					idata->udata.u.regAcc.Offset);
@@ -164,7 +174,7 @@ static BC_STATUS bc_cproc_reg_rd(struct crystalhd_cmd *ctx,
 static BC_STATUS bc_cproc_reg_wr(struct crystalhd_cmd *ctx,
 				 crystalhd_ioctl_data *idata)
 {
-	if (!ctx || !idata)
+	if (!ctx || !ctx->hw_ctx || !idata)
 		return BC_STS_INV_ARG;
 
 	ctx->hw_ctx->pfnWriteDevRegister(ctx->adp, idata->udata.u.regAcc.Offset,
@@ -176,7 +186,7 @@ static BC_STATUS bc_cproc_reg_wr(struct crystalhd_cmd *ctx,
 static BC_STATUS bc_cproc_link_reg_rd(struct crystalhd_cmd *ctx,
 				      crystalhd_ioctl_data *idata)
 {
-	if (!ctx || !idata)
+	if (!ctx || !ctx->hw_ctx || !idata)
 		return BC_STS_INV_ARG;
 
 	idata->udata.u.regAcc.Value = ctx->hw_ctx->pfnReadFPGARegister(ctx->adp,
@@ -187,7 +197,7 @@ static BC_STATUS bc_cproc_link_reg_rd(struct crystalhd_cmd *ctx,
 static BC_STATUS bc_cproc_link_reg_wr(struct crystalhd_cmd *ctx,
 				      crystalhd_ioctl_data *idata)
 {
-	if (!ctx || !idata)
+	if (!ctx || !ctx->hw_ctx || !idata)
 		return BC_STS_INV_ARG;
 
 	ctx->hw_ctx->pfnWriteFPGARegister(ctx->adp, idata->udata.u.regAcc.Offset,
@@ -201,7 +211,7 @@ static BC_STATUS bc_cproc_mem_rd(struct crystalhd_cmd *ctx,
 {
 	BC_STATUS sts = BC_STS_SUCCESS;
 
-	if (!ctx || !idata || !idata->add_cdata)
+	if (!ctx || !ctx->hw_ctx || !idata || !idata->add_cdata)
 		return BC_STS_INV_ARG;
 
 	if (idata->udata.u.devMem.NumDwords > (idata->add_cdata_sz / 4)) {
@@ -220,7 +230,7 @@ static BC_STATUS bc_cproc_mem_wr(struct crystalhd_cmd *ctx,
 {
 	BC_STATUS sts = BC_STS_SUCCESS;
 
-	if (!ctx || !idata || !idata->add_cdata)
+	if (!ctx || !ctx->hw_ctx || !idata || !idata->add_cdata)
 		return BC_STS_INV_ARG;
 
 	if (idata->udata.u.devMem.NumDwords > (idata->add_cdata_sz / 4)) {
@@ -307,7 +317,7 @@ static BC_STATUS bc_cproc_download_fw(struct crystalhd_cmd *ctx,
 
 	dev_dbg(chddev(), "Downloading FW\n");
 
-	if (!ctx || !idata || !idata->add_cdata || !idata->add_cdata_sz) {
+	if (!ctx || !ctx->hw_ctx || !idata || !idata->add_cdata || !idata->add_cdata_sz) {
 		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -350,7 +360,7 @@ static BC_STATUS bc_cproc_do_fw_cmd(struct crystalhd_cmd *ctx, crystalhd_ioctl_d
 	BC_STATUS sts;
 	uint32_t *cmd;
 
-	if (!(ctx->state & BC_LINK_INIT)) {
+	if ( !ctx || !idata || !(ctx->state & BC_LINK_INIT) || !ctx->hw_ctx) {
 		dev_dbg(dev, "Link invalid state do fw cmd %x \n", ctx->state);
 		return BC_STS_ERR_USAGE;
 	}
@@ -395,7 +405,7 @@ static void bc_proc_in_completion(struct crystalhd_dio_req *dio_hnd,
 		return;
 	}
 	if (sts == BC_STS_IO_USER_ABORT || sts == BC_STS_PWR_MGMT)
-		 return;
+		return;
 
 	dio_hnd->uinfo.comp_sts = sts;
 	dio_hnd->uinfo.ev_sts = 1;
@@ -407,6 +417,9 @@ static BC_STATUS bc_cproc_codein_sleep(struct crystalhd_cmd *ctx)
 	wait_queue_head_t sleep_ev;
 	int rc = 0;
 
+	if (!ctx)
+		return BC_STS_INV_ARG;
+
 	if (ctx->state & BC_LINK_SUSPEND)
 		return BC_STS_PWR_MGMT;
 
@@ -432,7 +445,7 @@ static BC_STATUS bc_cproc_hw_txdma(struct crystalhd_cmd *ctx,
 	wait_queue_head_t event;
 	int rc = 0;
 
-	if (!ctx || !idata || !dio) {
+	if (!ctx || !ctx->hw_ctx || !idata || !dio) {
 		dev_err(dev, "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -573,7 +586,7 @@ static BC_STATUS bc_cproc_add_cap_buff(struct crystalhd_cmd *ctx,
 	struct crystalhd_dio_req *dio_hnd = NULL;
 	BC_STATUS sts = BC_STS_SUCCESS;
 
-	if (!ctx || !idata) {
+	if (!ctx || !ctx->hw_ctx || !idata) {
 		dev_err(dev, "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -612,6 +625,11 @@ static BC_STATUS bc_cproc_fmt_change(struct crystalhd_cmd *ctx,
 {
 	BC_STATUS sts = BC_STS_SUCCESS;
 
+	if (!ctx || !dio) {
+		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
+		return BC_STS_INV_ARG;
+	}
+
 	sts = crystalhd_hw_add_cap_buffer(ctx->hw_ctx, dio, 0);
 	if (sts != BC_STS_SUCCESS)
 		return sts;
@@ -673,6 +691,10 @@ static BC_STATUS bc_cproc_fetch_frame(struct crystalhd_cmd *ctx,
 static BC_STATUS bc_cproc_start_capture(struct crystalhd_cmd *ctx,
 					crystalhd_ioctl_data *idata)
 {
+	if (!ctx || !ctx->hw_ctx || !idata) {
+		return BC_STS_INV_ARG;
+	}
+
 	ctx->state |= BC_LINK_CAP_EN;
 
 	if( idata->udata.u.RxCap.PauseThsh )
@@ -705,7 +727,7 @@ static BC_STATUS bc_cproc_flush_cap_buffs(struct crystalhd_cmd *ctx,
 	struct device *dev = chddev();
 	struct crystalhd_rx_dma_pkt *rpkt;
 
-	if (!ctx || !idata) {
+	if (!ctx || !ctx->hw_ctx || !idata) {
 		dev_err(dev, "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -745,8 +767,8 @@ static BC_STATUS bc_cproc_get_stats(struct crystalhd_cmd *ctx,
 	bool readTxOnly = false;
 	unsigned long irqflags;
 
-	if (!ctx || !idata) {
-		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
+	if (!ctx || !ctx->hw_ctx || !idata) {
+		dev_err(chddev(), "%s: Invalid Arg ctx,hw,data: 0x%lx 0x%lx 0x%lx\n", __func__, (uintptr_t)(ctx->hw_ctx), (uintptr_t)ctx, (uintptr_t)idata);
 		return BC_STS_INV_ARG;
 	}
 
@@ -828,6 +850,10 @@ get_out:
 static BC_STATUS bc_cproc_reset_stats(struct crystalhd_cmd *ctx,
 				      crystalhd_ioctl_data *idata)
 {
+	if (!ctx || !ctx->hw_ctx || !idata) {
+		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
+		return BC_STS_INV_ARG;
+	}
 	crystalhd_hw_stats(ctx->hw_ctx, NULL);
 
 	return BC_STS_SUCCESS;
@@ -949,8 +975,8 @@ BC_STATUS crystalhd_suspend(struct crystalhd_cmd *ctx, crystalhd_ioctl_data *ida
 	struct crystalhd_rx_dma_pkt *rpkt = NULL;
 
 	if (!ctx || !idata) {
-		dev_err(dev, "Invalid Parameters\n");
-		return BC_STS_ERROR;
+		dev_err(dev, "%s: Invalid Arg\n", __func__);
+		return BC_STS_INV_ARG;
 	}
 
 	if (ctx->state & BC_LINK_SUSPEND)
@@ -965,7 +991,7 @@ BC_STATUS crystalhd_suspend(struct crystalhd_cmd *ctx, crystalhd_ioctl_data *ida
 
 	bc_cproc_mark_pwr_state(ctx, BC_HW_SUSPEND); /* going to suspend */
 
-	if (ctx->state & BC_LINK_CAP_EN) {
+	if (ctx->hw_ctx && ctx->state & BC_LINK_CAP_EN) {
 		// Clean any pending RX
 		crystalhd_hw_stop_capture(ctx->hw_ctx, false);
 		while((rpkt = crystalhd_dioq_fetch(ctx->hw_ctx->rx_actq)) != NULL)
@@ -980,8 +1006,7 @@ BC_STATUS crystalhd_suspend(struct crystalhd_cmd *ctx, crystalhd_ioctl_data *ida
 		if (sts != BC_STS_SUCCESS)
 			return sts;
 	}
-	else
-	{
+	else if (ctx->hw_ctx) {
 		// Even if there is no active TX DMA need to stop and reset TX DMA pointers
 		ctx->hw_ctx->pfnStopTxDMA(ctx->hw_ctx);
 	}
@@ -1017,6 +1042,11 @@ BC_STATUS crystalhd_resume(struct crystalhd_cmd *ctx)
 {
 	BC_STATUS sts = BC_STS_SUCCESS;
 
+	if (!ctx) {
+		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
+		return BC_STS_INV_ARG;
+	}
+
 	sts = crystalhd_hw_resume(ctx->hw_ctx);
 	if (sts != BC_STS_SUCCESS)
 		return sts;
@@ -1049,13 +1079,13 @@ BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx,
 	struct crystalhd_user *uc;
 
 	if (!ctx || !user_ctx) {
-		dev_err(dev, "Invalid arg..\n");
+		dev_err(dev, "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
 
 	uc = bc_cproc_get_uid(ctx);
 	if (!uc) {
-		dev_info(dev, "No free user context...\n");
+		dev_info(dev, "%s No free user context.\n", __func__);
 		return BC_STS_BUSY;
 	}
 
@@ -1093,19 +1123,21 @@ BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx,
  *
  * Called at the time of driver load.
  */
-BC_STATUS __devinit crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
+BC_STATUS crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
 				    struct crystalhd_adp *adp)
 {
-	struct device *dev = &adp->pdev->dev;
+	struct device *dev;
 	int i = 0;
 
-	if (!ctx || !adp) {
-		dev_err(dev, "%s: Invalid arg\n", __func__);
+	if (!ctx || !adp || !adp->pdev) {
+		printk(KERN_ERR "%s: Invalid arg.\n", __func__);
 		return BC_STS_INV_ARG;
 	}
 
+	dev = &adp->pdev->dev;
+
 	if (ctx->adp)
-		dev_dbg(dev, "Resetting Cmd context delete missing..\n");
+		dev_dbg(dev, "Resetting Cmd context delete missing.\n");
 
 	ctx->adp = adp;
 	for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
@@ -1114,15 +1146,19 @@ BC_STATUS __devinit crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
 		ctx->user[i].mode = DTS_MODE_INV;
 	}
 
-	ctx->hw_ctx = (struct crystalhd_hw*)kmalloc(sizeof(struct crystalhd_hw), GFP_KERNEL);
-
-	memset(ctx->hw_ctx, 0, sizeof(struct crystalhd_hw));
+	if(ctx->hw_ctx == NULL) {
+		ctx->hw_ctx = (struct crystalhd_hw*)kmalloc(sizeof(struct crystalhd_hw), GFP_KERNEL);
+		if(ctx->hw_ctx != NULL)
+			memset(ctx->hw_ctx, 0, sizeof(struct crystalhd_hw));
+		else
+			return BC_STS_ERROR;
 
-	/*Open and Close the Hardware to put it in to sleep state*/
-	crystalhd_hw_open(ctx->hw_ctx, ctx->adp);
-	crystalhd_hw_close(ctx->hw_ctx, ctx->adp);
-	kfree(ctx->hw_ctx);
-	ctx->hw_ctx = NULL;
+		/*Open and Close the Hardware to put it in to sleep state*/
+		crystalhd_hw_open(ctx->hw_ctx, ctx->adp);
+		crystalhd_hw_close(ctx->hw_ctx, ctx->adp);
+		kfree(ctx->hw_ctx);
+		ctx->hw_ctx = NULL;
+	}
 
 	return BC_STS_SUCCESS;
 }
@@ -1136,10 +1172,15 @@ BC_STATUS __devinit crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
  *
  * Called at the time of driver un-load.
  */
-BC_STATUS __devexit crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx)
+BC_STATUS crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx)
 {
 	dev_dbg(chddev(), "Deleting Command context..\n");
 
+	if (!ctx) {
+		dev_err(chddev(), "%s: Invalid arg\n", __func__);
+		return BC_STS_INV_ARG;
+	}
+
 	ctx->adp = NULL;
 
 	return BC_STS_SUCCESS;
@@ -1165,8 +1206,8 @@ crystalhd_cmd_proc crystalhd_get_cmd_proc(struct crystalhd_cmd *ctx, uint32_t cm
 	crystalhd_cmd_proc cproc = NULL;
 	unsigned int i, tbl_sz;
 
-	if (!ctx) {
-		dev_err(dev, "Invalid arg.. Cmd[%d]\n", cmd);
+	if (!ctx || !uc) {
+		dev_err(dev, "Invalid arg. Cmd[%d]\n", cmd);
 		return NULL;
 	}
 
diff --git a/driver/linux/crystalhd_fleafuncs.c b/driver/linux/crystalhd_fleafuncs.c
index 1aa7115..f76d122 100644
--- a/driver/linux/crystalhd_fleafuncs.c
+++ b/driver/linux/crystalhd_fleafuncs.c
@@ -1344,7 +1344,9 @@ BCHP_SCRUB_CTRL_BI_CMAC_127_96		0x000f6018			CMAC Bits[127:96]
 bool crystalhd_flea_start_device(struct crystalhd_hw *hw)
 {
 	uint32_t	regVal	= 0;
-	bool		bRetVal = false;
+
+	if (!hw)
+		return false;
 
 	/*
 	-- Issue Core reset to bring in the default values in place
@@ -1430,7 +1432,7 @@ bool crystalhd_flea_start_device(struct crystalhd_hw *hw)
 
 	msleep_interruptible(1);
 
-	return bRetVal;
+	return true;
 }
 
 
diff --git a/driver/linux/crystalhd_hw.c b/driver/linux/crystalhd_hw.c
index cf8fefb..bffb468 100644
--- a/driver/linux/crystalhd_hw.c
+++ b/driver/linux/crystalhd_hw.c
@@ -38,7 +38,7 @@
 BC_STATUS crystalhd_hw_open(struct crystalhd_hw *hw, struct crystalhd_adp *adp)
 {
 	struct device *dev;
-	if (!hw || !adp) {
+	if (!hw || !adp || !adp->pdev) {
 		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
 		return BC_STS_INV_ARG;
 	}
@@ -110,7 +110,10 @@ BC_STATUS crystalhd_hw_open(struct crystalhd_hw *hw, struct crystalhd_adp *adp)
 	hw->rx_pkt_tag_seed = 0x70029070;
 
 	hw->stop_pending = 0;
-	hw->pfnStartDevice(hw);
+	if (!hw->pfnStartDevice(hw)) {
+		printk(KERN_ERR "%s: Failed to Start Device! \n", __func__);
+		return BC_STS_ERROR;
+	}
 	hw->dev_started = true;
 
 	dev_dbg(dev, "Opening HW. hw:0x%lx, hw->adp:0x%lx\n",
@@ -121,9 +124,9 @@ BC_STATUS crystalhd_hw_open(struct crystalhd_hw *hw, struct crystalhd_adp *adp)
 
 BC_STATUS crystalhd_hw_close(struct crystalhd_hw *hw, struct crystalhd_adp *adp)
 {
-	if (!hw) {
+	if (!hw || !adp) {
 		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
-		return BC_STS_SUCCESS;
+		return BC_STS_INV_ARG;
 	}
 
 	if (!hw->dev_started)
@@ -390,12 +393,12 @@ BC_STATUS crystalhd_hw_tx_req_complete(struct crystalhd_hw *hw,
 	struct tx_dma_pkt *tx_req;
 
 	if (!hw || !list_id) {
-		printk(KERN_ERR "%s: Invalid Arg!!\n", __func__);
+		printk(KERN_ERR "%s: Invalid Arg\n", __func__);
 		return BC_STS_INV_ARG;
 	}
 
 	tx_req = (struct tx_dma_pkt *)crystalhd_dioq_find_and_fetch(hw->tx_actq, list_id);
-	if (!tx_req) {
+	if (!tx_req || !tx_req->dio_req || !tx_req->cb_event) {
 		if (cs != BC_STS_IO_USER_ABORT)
 			dev_err(&hw->adp->pdev->dev, "Find/Fetch: no req!\n");
 		return BC_STS_NO_DATA;
@@ -1047,8 +1050,8 @@ BC_STATUS crystalhd_hw_resume(struct crystalhd_hw *hw)
 	hw->rx_list_post_index = 0;
 	hw->tx_list_post_index = 0;
 
-	if (hw->pfnStartDevice(hw)) {
-		dev_info(&hw->adp->pdev->dev, "Failed to Start Device!!\n");
+	if (!hw->pfnStartDevice(hw)) {
+		dev_info(&hw->adp->pdev->dev, "Failed to resume start device!\n");
 		return BC_STS_ERROR;
 	}
 
diff --git a/driver/linux/crystalhd_linkfuncs.c b/driver/linux/crystalhd_linkfuncs.c
index 8366cc3..c8be3ab 100644
--- a/driver/linux/crystalhd_linkfuncs.c
+++ b/driver/linux/crystalhd_linkfuncs.c
@@ -469,8 +469,8 @@ bool crystalhd_link_start_device(struct crystalhd_hw *hw)
 	uint32_t dbg_options, glb_cntrl = 0, reg_pwrmgmt = 0;
 	struct device *dev;
 
-	if (!hw)
-		return -EINVAL;
+	if (!hw || !hw->adp || !hw->adp->pdev)
+		return false;
 
 	dev = &hw->adp->pdev->dev;
 
@@ -957,6 +957,9 @@ void crystalhd_link_tx_isr(struct crystalhd_hw *hw, uint32_t int_sts)
 {
 	uint32_t err_sts;
 
+	if (!hw)
+		return;
+
 	if (int_sts & INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_MASK)
 		crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 0,
 					   BC_STS_SUCCESS);
@@ -1995,22 +1998,15 @@ bool crystalhd_link_hw_interrupt_handle(struct crystalhd_adp *adp, struct crysta
 {
 	uint32_t intr_sts = 0;
 	uint32_t deco_intr = 0;
-	bool rc = false;
 
-	if (!adp || !hw->dev_started)
-		return rc;
+	if (!adp || !hw || !hw->dev_started)
+		return false;
 
 	hw->stats.num_interrupts++;
 
 	deco_intr = hw->pfnReadDevRegister(hw->adp, Stream2Host_Intr_Sts);
 	intr_sts  = hw->pfnReadFPGARegister(hw->adp, INTR_INTR_STATUS);
 
-	if (intr_sts) {
-		/* let system know we processed interrupt..*/
-		rc = true;
-		hw->stats.dev_interrupts++;
-	}
-
 	if (deco_intr && (deco_intr != 0xdeaddead)) {
 
 		if (deco_intr & 0x80000000) {
@@ -2026,7 +2022,6 @@ bool crystalhd_link_hw_interrupt_handle(struct crystalhd_adp *adp, struct crysta
 
 		hw->pfnWriteDevRegister(hw->adp, Stream2Host_Intr_Sts, deco_intr);
 		hw->pfnWriteDevRegister(hw->adp, Stream2Host_Intr_Sts, 0);
-		rc = 1;
 	}
 
 	/* Rx interrupts */
@@ -2036,14 +2031,17 @@ bool crystalhd_link_hw_interrupt_handle(struct crystalhd_adp *adp, struct crysta
 	crystalhd_link_tx_isr(hw, intr_sts);
 
 	/* Clear interrupts */
-	if (rc) {
-		if (intr_sts)
-			hw->pfnWriteFPGARegister(hw->adp, INTR_INTR_CLR_REG, intr_sts);
+	if (intr_sts)
+		hw->pfnWriteFPGARegister(hw->adp, INTR_INTR_CLR_REG, intr_sts);
 
-		hw->pfnWriteFPGARegister(hw->adp, INTR_EOI_CTRL, 1);
+	hw->pfnWriteFPGARegister(hw->adp, INTR_EOI_CTRL, 1);
+
+	if (intr_sts) {
+		/* Let system know we have processed interrupts, and rc ret is always true unless invalid args. */
+		hw->stats.dev_interrupts++;
 	}
 
-	return rc;
+	return true;
 }
 
 /* Dummy private function */
diff --git a/driver/linux/crystalhd_lnx.c b/driver/linux/crystalhd_lnx.c
index 64e66ad..8608aea 100644
--- a/driver/linux/crystalhd_lnx.c
+++ b/driver/linux/crystalhd_lnx.c
@@ -431,7 +431,7 @@ static const struct file_operations chd_dec_fops = {
 	.llseek		= noop_llseek,
 };
 
-static int __devinit chd_dec_init_chdev(struct crystalhd_adp *adp)
+static int chd_dec_init_chdev(struct crystalhd_adp *adp)
 {
 	struct device *xdev = &adp->pdev->dev;
 	struct device *dev;
@@ -498,7 +498,7 @@ fail:
 	return rc;
 }
 
-static void __devexit chd_dec_release_chdev(struct crystalhd_adp *adp)
+static void chd_dec_release_chdev(struct crystalhd_adp *adp)
 {
 	crystalhd_ioctl_data *temp = NULL;
 	if (!adp)
@@ -523,7 +523,7 @@ static void __devexit chd_dec_release_chdev(struct crystalhd_adp *adp)
 	/*crystalhd_delete_elem_pool(adp); */
 }
 
-static int __devinit chd_pci_reserve_mem(struct crystalhd_adp *pinfo)
+static int chd_pci_reserve_mem(struct crystalhd_adp *pinfo)
 {
 	struct device *dev = &pinfo->pdev->dev;
 	int rc;
@@ -582,7 +582,7 @@ static int __devinit chd_pci_reserve_mem(struct crystalhd_adp *pinfo)
 	return 0;
 }
 
-static void __devexit chd_pci_release_mem(struct crystalhd_adp *pinfo)
+static void chd_pci_release_mem(struct crystalhd_adp *pinfo)
 {
 	if (!pinfo)
 		return;
@@ -597,7 +597,7 @@ static void __devexit chd_pci_release_mem(struct crystalhd_adp *pinfo)
 }
 
 
-static void __devexit chd_dec_pci_remove(struct pci_dev *pdev)
+static void chd_dec_pci_remove(struct pci_dev *pdev)
 {
 	struct crystalhd_adp *pinfo;
 	BC_STATUS sts = BC_STS_SUCCESS;
@@ -625,7 +625,7 @@ static void __devexit chd_dec_pci_remove(struct pci_dev *pdev)
 	g_adp_info = NULL;
 }
 
-static int __devinit chd_dec_pci_probe(struct pci_dev *pdev,
+static int chd_dec_pci_probe(struct pci_dev *pdev,
 			     const struct pci_device_id *entry)
 {
 	struct device *dev = &pdev->dev;
@@ -815,7 +815,7 @@ MODULE_DEVICE_TABLE(pci, chd_dec_pci_id_table);
 static struct pci_driver bc_chd_driver = {
 	.name     = "crystalhd",
 	.probe    = chd_dec_pci_probe,
-	.remove   = __devexit_p(chd_dec_pci_remove),
+	.remove   = chd_dec_pci_remove,
 	.id_table = chd_dec_pci_id_table,
 	.suspend  = chd_dec_pci_suspend,
 	.resume   = chd_dec_pci_resume
diff --git a/driver/linux/crystalhd_misc.c b/driver/linux/crystalhd_misc.c
index 410ab9d..56fbb51 100644
--- a/driver/linux/crystalhd_misc.c
+++ b/driver/linux/crystalhd_misc.c
@@ -512,8 +512,8 @@ void *crystalhd_dioq_fetch_wait(struct crystalhd_hw *hw, uint32_t to_secs, uint3
 			if(down_interruptible(&hw->fetch_sem))
 				goto sem_error;
 			r_pkt = crystalhd_dioq_fetch(ioq);
-			/* If format change packet, then return with out checking anything */
-			if (r_pkt->flags & (COMP_FLAG_PIB_VALID | COMP_FLAG_FMT_CHANGE))
+			/* If format change packet then return without checking anything */
+			if (!r_pkt || r_pkt->flags & (COMP_FLAG_PIB_VALID | COMP_FLAG_FMT_CHANGE))
 				goto sem_rel_return;
 			if (hw->adp->pdev->device == BC_PCI_DEVID_LINK) {
 				picYcomp = link_GetRptDropParam(hw, hw->PICHeight, hw->PICWidth, (void *)r_pkt);

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-02-08 13:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-02  7:48 [BUG] crystalhd git.linuxtv.org kernel driver: unable to handle kernel paging requests, improper (spin)locking(?) and paging thomas schorpp
2013-01-03 15:17 ` Oliver Schinagl
2013-01-05 12:21   ` [BUG] crystalhd git.linuxtv.org kernel driver: unable to handle kernel paging requests, improper (spin)locking(?) and paging, null pointer oopses on SMP, libcrstalhd3-git i686 not interfacing to amd64 SMP 3.x kernel thomas schorpp
2013-01-05 12:44   ` thomas schorpp
2013-01-07 23:33     ` [BUG] crystalhd git.linuxtv.org kernel driver: No more Oops or kernel crashes with Linux 3.2 thomas schorpp
2013-01-11  0:43       ` [BUG] crystalhd git.linuxtv.org kernel driver: Crashing again Linux, 3.2, using mozilla flashplugin from adobe thomas schorpp
2013-01-25 21:38         ` [PATCH] crystalhd git.linuxtv.org kernel driver: FIX null pointer BUG in crystalhd_dioq_fetch_wait() on queue(s) overload thomas schorpp
2013-02-01  1:52         ` [PATCH] crystalhd git.linuxtv.org kernel driver: FIX MORE null pointer BUGs triggered by multithreaded or faulty apps thomas schorpp
2013-02-01 20:23         ` [PATCH] crystalhd git.linuxtv.org kernel driver: FIX kernel unhandled paging request BUG " thomas schorpp
2013-02-04 15:21         ` [PATCH] crystalhd git.linuxtv.org kernel driver: FIX kernel freeze or OOPS in ISRs thomas schorpp
2013-02-08 13:59         ` [PATCH] crystalhd git.linuxtv.org kernel driver: Fix PM suspend broken by emergency patches thomas schorpp

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.