Hi I try add IR for our TV cards. After my some changes IR is working. But when I remove USB stick from USB port modules crashed with dmesg [ 133.881750] tm6000: New video device @ 480 Mbps (6000:dec0, ifnum 0) [ 133.881759] tm6000: Found Beholder Wander DVB-T/TV/FM USB2.0 [ 134.343012] Board version = 0x67980bf4 [ 134.484013] board=0x67980bf4 [ 134.575011] tm6000 #0: i2c eeprom 00: 42 59 54 45 12 01 00 02 00 00 00 40 00 60 c0 de BYTE.......@.`.. [ 134.687012] tm6000 #0: i2c eeprom 10: 01 00 10 20 40 01 28 03 42 00 65 00 68 00 6f 00 ... @.(.B.e.h.o. [ 134.799014] tm6000 #0: i2c eeprom 20: 6c 00 64 00 65 00 72 00 20 00 49 00 6e 00 74 00 l.d.e.r. .I.n.t. [ 134.911012] tm6000 #0: i2c eeprom 30: 6c 00 2e 00 20 00 4c 00 74 00 64 00 2e 00 ff ff l... .L.t.d..... [ 135.023013] tm6000 #0: i2c eeprom 40: 22 03 42 00 65 00 68 00 6f 00 6c 00 64 00 20 00 ".B.e.h.o.l.d. . [ 135.135015] tm6000 #0: i2c eeprom 50: 54 00 56 00 20 00 57 00 61 00 6e 00 64 00 65 00 T.V. .W.a.n.d.e. [ 135.247014] tm6000 #0: i2c eeprom 60: 72 00 ff ff ff ff ff ff ff ff 1a 03 56 00 69 00 r...........V.i. [ 135.359013] tm6000 #0: i2c eeprom 70: 64 00 65 00 6f 00 43 00 61 00 70 00 74 00 75 00 d.e.o.C.a.p.t.u. [ 135.471013] tm6000 #0: i2c eeprom 80: 72 00 65 00 ff ff ff ff ff ff ff ff ff ff ff ff r.e............. [ 135.583010] tm6000 #0: i2c eeprom 90: ff ff ff ff 16 03 30 00 30 00 30 00 30 00 30 00 ......0.0.0.0.0. [ 135.695010] tm6000 #0: i2c eeprom a0: 30 00 32 00 30 00 34 00 31 00 ff ff ff ff ff ff 0.2.0.4.1....... [ 135.807012] tm6000 #0: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ [ 135.919011] tm6000 #0: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ [ 136.031014] tm6000 #0: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ [ 136.143010] tm6000 #0: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ [ 136.255014] tm6000 #0: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ [ 136.360015] ................ [ 136.362337] tuner 7-0061: chip found @ 0xc2 (tm6000 #0) [ 136.421801] xc5000 7-0061: creating new instance [ 136.450015] xc5000: Successfully identified at address 0x61 [ 136.450019] xc5000: Firmware has not been loaded previously [ 136.450025] tuner 7-0061: Tuner frontend module has no way to set config [ 136.504012] xc5000: waiting for firmware upload (dvb-fe-xc5000-1.6.114.fw)... [ 136.564545] xc5000: firmware read 12401 bytes. [ 136.564549] xc5000: firmware uploading... [ 143.241011] xc5000: firmware upload complete... [ 144.670093] Trident TVMaster TM5600/TM6000/TM6010 USB2 board (Load status: 0) [ 144.671201] tm6000: open called (dev=video0) [ 144.825125] usb 1-1: link qh0-00ff/f6762340 start 0 [1/0 us] [ 144.888012] Registered IR keymap rc-behold-columbus [ 144.888159] input: tm5600/60x0 IR (tm6000 #0) as /class/input/input5 [ 144.888217] rc0: tm5600/60x0 IR (tm6000 #0) as /class/rc/rc0 [ 145.044067] usbcore: registered new interface driver tm6000 [ 145.882658] tm6000: open called (dev=video0) [ 156.860296] hub 1-0:1.0: state 7 ports 8 chg 0000 evt 0002 [ 156.860310] ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001002 POWER sig=se0 CSC [ 156.860323] hub 1-0:1.0: port 1, status 0100, change 0001, 12 Mb/s [ 156.860328] usb 1-1: USB disconnect, address 2 [ 156.860332] usb 1-1: unregistering device [ 156.860336] usb 1-1: usb_disable_device nuking all URBs [ 156.860370] usb 1-1: unlink qh0-00ff/f6762340 start 0 [1/0 us] [ 156.860432] tm6000_ir_urb_received start [ 156.860435] not ready [ 156.860440] ehci_hcd 0000:00:1d.7: shutdown urb f4900cc0 ep3in-intr [ 156.860446] usb 1-1: unregistering interface 1-1:1.0 [ 156.860492] tm6000: disconnecting tm6000 #0 [ 156.860494] befor if (!ir) [ 156.860495] befor ir_input_unregister(ir->input->input_dev); [ 156.862220] BUG: unable to handle kernel NULL pointer dereference at 000000f0 [ 156.862223] IP: [<f80370a9>] ir_close+0x12/0x20 [ir_core] [ 156.862230] *pde = 00000000 [ 156.862232] Oops: 0000 [#1] PREEMPT SMP [ 156.862235] last sysfs file: /sys/class/video4linux/video0/uevent [ 156.862238] Modules linked in: rc_behold_columbus xc5000 tuner tm6000(C) v4l2_common ir_lirc_codec videodev lirc_dev ir_sony_decoder v4l1_compat videobuf_vmalloc ir_jvc_decoder videobuf_core ir_rc6_decoder ir_rc5_decoder ir_nec_decoder ir_common ir_core ppdev lp ipv6 nls_utf8 ntfs dm_snapshot dm_mirror dm_region_hash dm_log dm_mod sha1_generic arc4 ecb ppp_mppe ppp_generic slhc loop nvidia(P) snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device snd i2c_i801 psmouse parport_pc processor soundcore tpm_tis parport rng_core i2c_core intel_agp tpm button pcspkr serio_raw snd_page_alloc agpgart tpm_bios evdev ext3 jbd mbcache sr_mod sd_mod cdrom ata_generic ata_piix libata scsi_mod uhci_hcd ide_pci_generic ehci_hcd ide_core usbcore nls_base r8169 mii thermal thermal_sys [last unloaded: scsi_wait_scan] [ 156.862296] [ 156.862299] Pid: 570, comm: khubd Tainted: P C 2.6.35-tm6000-new3+ #1 G31M-S2L/G31M-ES2L [ 156.862302] EIP: 0060:[<f80370a9>] EFLAGS: 00010282 CPU: 1 [ 156.862305] EIP is at ir_close+0x12/0x20 [ir_core] [ 156.862307] EAX: 00000000 EBX: f497a000 ECX: 00000000 EDX: f8037097 [ 156.862309] ESI: f4903208 EDI: f497a790 EBP: f6401dc0 ESP: f6401dc0 [ 156.862311] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 [ 156.862314] Process khubd (pid: 570, ti=f6400000 task=f644c590 task.ti=f6400000) [ 156.862315] Stack: [ 156.862316] f6401dd4 c11c8867 f4903208 f4903200 f4903244 f6401dec f834dc91 f490323c [ 156.862321] <0> f4903208 f4903200 f490325c f6401e00 f834dcb9 f497a860 f497a000 f497a874 [ 156.862327] <0> f6401e14 c11c8b59 f497a7ac f7252800 f497a000 f6401e28 f8037ac6 f7252800 [ 156.862333] Call Trace: [ 156.862338] [<c11c8867>] ? input_close_device+0x43/0x5f [ 156.862345] [<f834dc91>] ? evdev_cleanup+0xbd/0xc5 [evdev] [ 156.862349] [<f834dcb9>] ? evdev_disconnect+0x20/0x33 [evdev] [ 156.862352] [<c11c8b59>] ? input_unregister_device+0x8c/0x11a [ 156.862356] [<f8037ac6>] ? ir_unregister_class+0x3a/0x50 [ir_core] [ 156.862359] [<f803707e>] ? ir_input_unregister+0x7e/0x97 [ir_core] [ 156.862363] [<f818d735>] ? tm6000_ir_fini+0x3d/0xda [tm6000] [ 156.862367] [<f81891aa>] ? tm6000_usb_disconnect+0x48/0xdb [tm6000] [ 156.862377] [<f810d572>] ? usb_unbind_interface+0x45/0xb7 [usbcore] [ 156.862384] [<c11bddf5>] ? __device_release_driver+0x5d/0x93 [ 156.862387] [<c11bded2>] ? device_release_driver+0x1d/0x28 [ 156.862390] [<c11bd521>] ? bus_remove_device+0x92/0xa9 [ 156.862393] [<c11bbde3>] ? device_del+0xfb/0x132 [ 156.862402] [<f810b45d>] ? usb_disable_device+0xb2/0x116 [usbcore] [ 156.862412] [<f8106aa2>] ? usb_disconnect+0x8e/0x10e [usbcore] [ 156.862422] [<f8107b9f>] ? hub_thread+0x56c/0xe91 [usbcore] [ 156.862428] [<c10486f1>] ? autoremove_wake_function+0x0/0x38 [ 156.862439] [<f8107633>] ? hub_thread+0x0/0xe91 [usbcore] [ 156.862442] [<c104830b>] ? kthread+0x66/0x6b [ 156.862445] [<c10482a5>] ? kthread+0x0/0x6b [ 156.862448] [<c1002eb6>] ? kernel_thread_helper+0x6/0x10 [ 156.862450] Code: 8b 83 c8 00 00 00 e8 61 38 08 c9 89 d8 e8 5a 38 08 c9 8d 65 f8 5b 5e 5d c3 55 89 e5 0f 1f 44 00 00 05 ac 07 00 00 e8 a8 6c 18 c9 <8b> 90 f0 00 00 00 8b 42 20 ff 52 2c 5d c3 55 89 e5 0f 1f 44 00 [ 156.862481] EIP: [<f80370a9>] ir_close+0x12/0x20 [ir_core] SS:ESP 0068:f6401dc0 [ 156.862486] CR2: 00000000000000f0 [ 156.862488] ---[ end trace 7a803f828333ac48 ]--- Source tm6000-input int tm6000_ir_fini(struct tm6000_core *dev) { struct tm6000_IR *ir = dev->ir; /* skip detach on non attached board */ if (!ir) return 0; ir_input_unregister(ir->input->input_dev); The modules crashed when call ir_input_unregister And never called tm6000_ir_stop static void tm6000_ir_stop(void *priv) { struct tm6000_IR *ir = priv; cancel_delayed_work_sync(&ir->work); } And function default_polling_getkey is not dead. With my best regards, Dmitry. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html