LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* mceusb: sysfs: cannot create duplicate filename '/class/rc/rc0' (race condition between multiple RC_CORE devices)
@ 2014-12-18 18:16 Stefan Lippers-Hollmann
  2014-12-30 21:11 ` Stefan Lippers-Hollmann
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Lippers-Hollmann @ 2014-12-18 18:16 UTC (permalink / raw)
  To: jarod; +Cc: linux-media, linux-kernel, m.chehab

Hi

Occassionally, but not readily reproducably, I hit a race condition 
between mceusb and other connected RC_CORE devices when mceusb tries 
to create /class/rc/rc0, which is -by then- already taken by another 
RC_CORE device. The other involved IR devices (physically only one)
are part of a PCIe TeVii s480 s2.1 twin-tuner DVB-S2 card and aren't 
actually supposed to receive IR signals (IR receiver not connected):

mceusb device transceiver:
Bus 002 Device 004: ID 0609:0334 SMK Manufacturing, Inc. eHome Infrared Receiver

DVB-T receiver (no RC_CORE device)
Bus 001 Device 004: ID 0ccd:0069 TerraTec Electronic GmbH Cinergy T XE (Version 2, AF9015)

twin-tuner DVB-S2 PCIe device, TeVii s480 v2.1 (physically one IR 
receiver (NEC protocol), logically recognized as two RC_CORE devices):
04:00.0 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCIe to 4‐Port USB 2.0 Host Controller                                                                                                                                                                                                                                                                                
04:00.1 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCIe to 4‐Port USB 2.0 Host Controller                                                                                                                                                                                                                                                                                
04:00.2 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCIe to 4‐Port USB 2.0 Host Controller                                                                                                                                                                                                                                                                                
04:00.3 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCIe to 4‐Port USB 2.0 Host Controller                                                                                                                                                                                                                                                                                
04:00.4 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCIe to 4‐Port USB 2.0 Host Controller                                                                                                                                                                                                                                                                                
04:00.5 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCIe to 4‐Port USB 2.0 Host Controller                                                                                                                                                                                                                                                                                
04:00.6 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCIe to 4‐Port USB 2.0 Host Controller                                                                                                                                                                                                                                                                                
04:00.7 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCIe to 4‐Port USB 2.0 Host Controller
	Bus 006 Device 003: ID 9022:d660 TeVii Technology Ltd. DVB-S2 S660
	Bus 003 Device 003: ID 9022:d660 TeVii Technology Ltd. DVB-S2 S660

dmesg excerpt from kernel 3.18.1-rc1, but this already happened 
randomly with older kernels:

[...]
dvb_usb_dw2102: unknown parameter 'keymap' ignored
dvb-usb: found a 'TeVii S480.1 USB' in cold state, will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-s660.fw'
dw2102: start downloading DW210X firmware
[...]
usb 1-1.5: dvb_usb_v2: found a 'TerraTec Cinergy T USB XE' in cold state
[...]
usb 1-1.5: dvb_usb_v2: downloading firmware from file 'dvb-usb-af9015.fw'
usb 2-1.6: New USB device found, idVendor=0609, idProduct=0334
usb 2-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1.6: Product: MCE TRANCEIVR Emulator Device 2006
usb 2-1.6: Manufacturer: SMK CORPORATION
usb 2-1.6: SerialNumber: PA070620045513C
[...]
usb 3-1: USB disconnect, device number 2
usb 1-1.5: dvb_usb_v2: found a 'TerraTec Cinergy T USB XE' in warm state
[...]
dvb-usb: found a 'TeVii S480.1 USB' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (TeVii S480.1 USB)
dvb-usb: MAC address: 40:40:40:40:40:40
Invalid probe, probably not a DS3000
dvb-usb: no frontend was attached by 'TeVii S480.1 USB'
[...]
Registered IR keymap rc-tevii-nec
input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1c.5/0000:04:00.1/usb3/3-1/rc/rc0/input18
rc0: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1c.5/0000:04:00.1/usb3/3-1/rc/rc0
dvb-usb: schedule remote query interval to 150 msecs.
dvb-usb: TeVii S480.1 USB successfully initialized and connected.
dvb-usb: found a 'TeVii S480.2 USB' in cold state, will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-s660.fw'
dw2102: start downloading DW210X firmware
[...]
Registered IR keymap rc-rc6-mce
------------[ cut here ]------------
WARNING: CPU: 3 PID: 308 at /tmp/buildd/linux-aptosid-3.18/fs/sysfs/dir.c:31 sysfs_warn_dup+0x55/0x70()
sysfs: cannot create duplicate filename '/class/rc/rc0'
Modules linked in: rt2800usb(+) rt2x00usb rt2800lib rt2x00lib mac80211 cfg80211 crc_ccitt rc_rc6_mce mceusb(+) rc_tevii_nec ds3000 nls_utf8 nls_cp437 vfat fat intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp iTCO_wdt eeepc_wmi iTCO_vendor_support asus_wmi sparse_keymap kvm_intel rfkill evdev kvm crct10dif_pclmul crc32_pclmul snd_hda_codec_hdmi snd_hda_codec_realtek dvb_usb_af9015(+) ghash_clmulni_intel snd_hda_codec_generic dvb_usb_v2 aesni_intel dvb_usb_dw2102(+) aes_x86_64 dvb_usb lrw gf128mul psmouse glue_helper dvb_core ablk_helper serio_raw cryptd rc_core pcspkr snd_hda_intel i2c_i801 snd_hda_controller snd_hda_codec snd_hwdep snd_pcm snd_timer snd soundcore lpc_ich mfd_core battery tpm_infineon wmi i915 button video i2c_algo_bit drm_kms_helper drm i2c_core mei_me intel_gtt
 mei ie31200_edac edac_core processor nct6775 hwmon_vid fuse parport_pc ppdev lp parport autofs4 ext4 crc16 jbd2 mbcache dm_mod sg sd_mod ohci_pci crc32c_intel ahci libahci libata scsi_mod xhci_pci xhci_hcd ohci_hcd ehci_pci ehci_hcd r8169 mii usbcore usb_common thermal fan
CPU: 3 PID: 308 Comm: systemd-udevd Not tainted 3.18.0-0.slh.2-aptosid-amd64 #1 aptosid 3.18-4
Hardware name: System manufacturer System Product Name/P8H77-M PRO, BIOS 1503 03/17/2014
 0000000000000009 00000000acb81fbf 0000000000000009 ffffffff814ddd08
 ffff8807f048b8a0 ffffffff8105f3fd ffff8807f0e45000 ffff8807f0114438
 ffff8807f3550bb8 ffff8807f3550bb8 ffffffffffffffef ffffffff8105f478
Call Trace:
 [<ffffffff814ddd08>] ? dump_stack+0x49/0x6a
 [<ffffffff8105f3fd>] ? warn_slowpath_common+0x6d/0x90
 [<ffffffff8105f478>] ? warn_slowpath_fmt+0x58/0x80
 [<ffffffff811e8042>] ? kernfs_path+0x42/0x50
 [<ffffffff811eb3d5>] ? sysfs_warn_dup+0x55/0x70
 [<ffffffff811eb72e>] ? sysfs_do_create_link_sd.isra.2+0xbe/0xd0
 [<ffffffff81362f24>] ? device_add+0x3b4/0x660
 [<ffffffffa01238ec>] ? rc_register_device+0x1bc/0x600 [rc_core]
 [<ffffffffa0d47f55>] ? mceusb_dev_probe+0x405/0xadd [mceusb]
 [<ffffffff8126eaf8>] ? ida_get_new_above+0x1f8/0x220
 [<ffffffffa003669b>] ? usb_probe_interface+0x1ab/0x2d0 [usbcore]
 [<ffffffff81365c87>] ? driver_probe_device+0x87/0x260
 [<ffffffff81365f2b>] ? __driver_attach+0x7b/0x80
 [<ffffffff81365eb0>] ? __device_attach+0x50/0x50
 [<ffffffff81363d4b>] ? bus_for_each_dev+0x6b/0xc0
 [<ffffffff81365428>] ? bus_add_driver+0x178/0x230
 [<ffffffff8136655e>] ? driver_register+0x5e/0xf0
 [<ffffffffa003504b>] ? usb_register_driver+0x7b/0x160 [usbcore]
 [<ffffffffa0d4b000>] ? 0xffffffffa0d4b000
 [<ffffffffa0d4b000>] ? 0xffffffffa0d4b000
 [<ffffffff81002108>] ? do_one_initcall+0x98/0x200
 [<ffffffff810cf144>] ? load_module+0x1ce4/0x22b0
 [<ffffffff810cc330>] ? __symbol_put+0xa0/0xa0
 [<ffffffff811804de>] ? kernel_read+0x4e/0x80
 [<ffffffff810cf87d>] ? SyS_finit_module+0x8d/0xa0
 [<ffffffff814e3d29>] ? system_call_fastpath+0x12/0x17
---[ end trace a644812bec4f2609 ]---
mceusb 2-1.6:1.0: remote dev registration failed
mceusb 2-1.6:1.0: mceusb_dev_probe: device setup failed!
mceusb: probe of 2-1.6:1.0 failed with error -12
usbcore: registered new interface driver mceusb
dvb-usb: TeVii S480.1 USB successfully deinitialized and disconnected.
usb 6-1: USB disconnect, device number 2
usb 2-1.5: reset high-speed USB device number 3 using ehci-pci
dvb-usb: found a 'TeVii S480.2 USB' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (TeVii S480.2 USB)
dvb-usb: MAC address: 90:90:90:90:90:90
Invalid probe, probably not a DS3000
dvb-usb: no frontend was attached by 'TeVii S480.2 USB'
Registered IR keymap rc-tevii-nec
input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1c.5/0000:04:00.3/usb6/6-1/rc/rc0/input20
rc0: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1c.5/0000:04:00.3/usb6/6-1/rc/rc0
dvb-usb: schedule remote query interval to 150 msecs.
dvb-usb: TeVii S480.2 USB successfully initialized and connected.
usbcore: registered new interface driver dw2102
dvb-usb: TeVii S480.2 USB successfully deinitialized and disconnected.
[...]
usb 1-1.5: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
DVB: registering new adapter (TerraTec Cinergy T USB XE)
i2c i2c-9: af9013: firmware version 5.1.0.0
usb 1-1.5: DVB: registering adapter 0 frontend 0 (Afatech AF9013)...
mc44s803: successfully identified (ID = 14)
usb 1-1.5: dvb_usb_v2: 'TerraTec Cinergy T USB XE' successfully initialized and connected
usbcore: registered new interface driver dvb_usb_af9015
[...]
usb 3-1: new high-speed USB device number 3 using ehci-pci
usb 3-1: config 1 interface 0 altsetting 0 bulk endpoint 0x81 has invalid maxpacket 2
usb 3-1: New USB device found, idVendor=9022, idProduct=d660
usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 3-1: Product: DVBS2BOX
usb 3-1: Manufacturer: TBS-Tech
dvb-usb: found a 'TeVii S660 USB' in cold state, will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-s660.fw'
dw2102: start downloading DW210X firmware
usb 6-1: new high-speed USB device number 3 using ehci-pci
dvb-usb: found a 'TeVii S660 USB' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (TeVii S660 USB)
usb 6-1: config 1 interface 0 altsetting 0 bulk endpoint 0x81 has invalid maxpacket 2
[...]
usb 6-1: New USB device found, idVendor=9022, idProduct=d660
usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 6-1: Product: DVBS2BOX
usb 6-1: Manufacturer: TBS-Tech
dvb-usb: found a 'TeVii S660 USB' in cold state, will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-s660.fw'
dw2102: start downloading DW210X firmware
dvb-usb: found a 'TeVii S660 USB' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (TeVii S660 USB)
dvb-usb: MAC address: 00:18:bd:5a:be:8b
DS3000 chip version: 0.192 attached.
ts2020_attach: Find tuner TS2020!
dw2102: Attached ds3000+ts2020!
usb 3-1: DVB: registering adapter 1 frontend 0 (Montage Technology DS3000)...
Registered IR keymap rc-tevii-nec
input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1c.5/0000:04:00.1/usb3/3-1/rc/rc0/input25
rc0: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1c.5/0000:04:00.1/usb3/3-1/rc/rc0
dvb-usb: schedule remote query interval to 150 msecs.
dvb-usb: TeVii S660 USB successfully initialized and connected.
dvb-usb: MAC address: 00:18:bd:5a:be:8c
DS3000 chip version: 0.192 attached.
ts2020_attach: Find tuner TS2020!
dw2102: Attached ds3000+ts2020!
usb 6-1: DVB: registering adapter 2 frontend 0 (Montage Technology DS3000)...
Registered IR keymap rc-tevii-nec
input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1c.5/0000:04:00.3/usb6/6-1/rc/rc1/input26
rc1: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1c.5/0000:04:00.3/usb6/6-1/rc/rc1
dvb-usb: schedule remote query interval to 150 msecs.
dvb-usb: TeVii S660 USB successfully initialized and connected.
[...]
ds3000_firmware_ondemand: Waiting for firmware upload (dvb-fe-ds3000.fw)...
ds3000_firmware_ondemand: Waiting for firmware upload(2)...
ds3000_firmware_ondemand: Waiting for firmware upload (dvb-fe-ds3000.fw)...
ds3000_firmware_ondemand: Waiting for firmware upload(2)...
[...]

This can be recovered by reloading mceusb
# modprobe -r mceusb
# modprobe mceusb

usbcore: deregistering interface driver mceusb
Registered IR keymap rc-rc6-mce
input: Media Center Ed. eHome Infrared Remote Transceiver (0609:0334) as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/rc/rc2/input27
rc2: Media Center Ed. eHome Infrared Remote Transceiver (0609:0334) as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/rc/rc2
IR RC5(x/sz) protocol handler initialized
IR NEC protocol handler initialized
IR RC6 protocol handler initialized
IR Sony protocol handler initialized
IR JVC protocol handler initialized
IR SANYO protocol handler initialized
IR Sharp protocol handler initialized
input: MCE IR Keyboard/Mouse (mceusb) as /devices/virtual/input/input28
lirc_dev: IR Remote Control driver registered, major 249 
IR MCE Keyboard/mouse protocol handler initialized
IR XMP protocol handler initialized
rc rc2: lirc_dev: driver ir-lirc-codec (mceusb) registered at minor = 0
IR LIRC bridge handler initialized
mceusb 2-1.6:1.0: Registered SMK CORPORATION MCE TRANCEIVR Emulator Device 2006 with mce emulator interface version 1
mceusb 2-1.6:1.0: 2 tx ports (0x0 cabled) and 2 rx sensors (0x1 active)
usbcore: registered new interface driver mceusb

Regards
	Stefan Lippers-Hollmann

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

* Re: mceusb: sysfs: cannot create duplicate filename '/class/rc/rc0' (race condition between multiple RC_CORE devices)
  2014-12-18 18:16 mceusb: sysfs: cannot create duplicate filename '/class/rc/rc0' (race condition between multiple RC_CORE devices) Stefan Lippers-Hollmann
@ 2014-12-30 21:11 ` Stefan Lippers-Hollmann
  2015-03-30 15:30   ` Stefan Lippers-Hollmann
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Lippers-Hollmann @ 2014-12-30 21:11 UTC (permalink / raw)
  To: jarod
  Cc: linux-media, linux-kernel, m.chehab, James Hogan,
	David Härdeman, Antti Seppälä,
	Tomas Melin

Hi

Adding the maintainers for drivers/media/rc/rc-main.c into the loop.

This is a follow-up for:
	http://lkml.kernel.org/r/<201412181916.18051.s.L-H@gmx.de>

On Thursday 18 December 2014, Stefan Lippers-Hollmann wrote:
> Occassionally, but not readily reproducably, I hit a race condition 
> between mceusb and other connected RC_CORE devices when mceusb tries 
> to create /class/rc/rc0, which is -by then- already taken by another 
> RC_CORE device. The other involved IR devices (physically only one)
> are part of a PCIe TeVii s480 s2.1 twin-tuner DVB-S2 card and aren't 
> actually supposed to receive IR signals (IR receiver not connected):
> 
> mceusb device transceiver:
> Bus 002 Device 004: ID 0609:0334 SMK Manufacturing, Inc. eHome Infrared Receiver
> 
> DVB-T receiver (no RC_CORE device)
> Bus 001 Device 004: ID 0ccd:0069 TerraTec Electronic GmbH Cinergy T XE (Version 2, AF9015)
> 
> twin-tuner DVB-S2 PCIe device, TeVii s480 v2.1 (physically one IR 
> receiver (NEC protocol), logically recognized as two RC_CORE devices):
[...]
> 	Bus 006 Device 003: ID 9022:d660 TeVii Technology Ltd. DVB-S2 S660
> 	Bus 003 Device 003: ID 9022:d660 TeVii Technology Ltd. DVB-S2 S660

Today I got a new, similar, trace with kernel 3.18.1, but this is not a
regression and randomly happens with older kernels as well. The 
frequency of this occuring differs vastly, this time it was 12 days 
with probably 20 (re-)boots, before that it didn't happen for multiple
weeks. I can not totally rule out if it ever happened in the reverse
detection/ initialisation order, as I wouldn't notice the consequences 
of dvb_usb_dw2102's RC_CORE devices failing to initialise, but I think
the problem might be seated in the common core of rc-main.c.

usb 1-1.5: New USB device found, idVendor=0ccd, idProduct=0069
usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.5: Product: Cinergy T USB XE Ver.2
usb 1-1.5: Manufacturer: TerraTec
usb 1-1.5: SerialNumber: 10012007
[...]
dvb-usb: found a 'TeVii S480.1 USB' in cold state, will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-s660.fw'
dw2102: start downloading DW210X firmware
usb 1-1.5: dvb_usb_v2: found a 'TerraTec Cinergy T USB XE' in cold state
usb 1-1.5: dvb_usb_v2: downloading firmware from file 'dvb-usb-af9015.fw'
[...]
usb 2-1.6: New USB device found, idVendor=0609, idProduct=0334
usb 2-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1.6: Product: MCE TRANCEIVR Emulator Device 2006
usb 2-1.6: Manufacturer: SMK CORPORATION
usb 2-1.6: SerialNumber: PA070620045513C
[...]
usb 3-1: USB disconnect, device number 2
usb 2-1.8: new full-speed USB device number 5 using ehci-pci
usb 1-1.5: dvb_usb_v2: found a 'TerraTec Cinergy T USB XE' in warm state
[...]
dvb-usb: found a 'TeVii S480.1 USB' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (TeVii S480.1 USB)
dvb-usb: MAC address: 70:70:70:70:70:70
Invalid probe, probably not a DS3000
dvb-usb: no frontend was attached by 'TeVii S480.1 USB'
[...]
Registered IR keymap rc-tevii-nec
input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1c.5/0000:04:00.1/usb3/3-1/rc/rc0/input18
rc0: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1c.5/0000:04:00.1/usb3/3-1/rc/rc0
dvb-usb: schedule remote query interval to 150 msecs.
dvb-usb: TeVii S480.1 USB successfully initialized and connected.
dvb-usb: found a 'TeVii S480.2 USB' in cold state, will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-s660.fw'
dw2102: start downloading DW210X firmware
[...]
Registered IR keymap rc-rc6-mce
------------[ cut here ]------------
WARNING: CPU: 1 PID: 311 at /tmp/buildd/linux-aptosid-3.18/fs/sysfs/dir.c:31 sysfs_warn_dup+0x55/0x70()
sysfs: cannot create duplicate filename '/class/rc/rc0'
Modules linked in: rt2800usb(+) rt2x00usb rt2800lib rt2x00lib mac80211 cfg80211 crc_ccitt rc_rc6_mce mceusb(+) rc_tevii_nec ds3000 nls_utf8 nls_cp437 vfat fat iTCO_wdt iTCO_vendor_support eeepc_wmi asus_wmi intel_rapl sparse_keymap rfkill x86_pkg_temp_thermal evdev intel_powerclamp coretemp kvm_intel kvm snd_hda_codec_hdmi crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec_realtek snd_hda_codec_generic aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper dvb_usb_af9015(+) cryptd dvb_usb_v2 dvb_usb_dw2102(+) dvb_usb dvb_core rc_core psmouse snd_hda_intel pcspkr snd_hda_controller serio_raw i2c_i801 snd_hda_codec snd_hwdep snd_pcm snd_timer snd soundcore lpc_ich mfd_core battery tpm_infineon i915 video i2c_algo_bit drm_kms_helper drm i2c_core intel_gtt ie31200_edac mei_me
 edac_core mei wmi button processor nct6775 hwmon_vid fuse parport_pc ppdev lp parport autofs4 ext4 crc16 jbd2 mbcache dm_mod sg sd_mod ohci_pci crc32c_intel ahci libahci libata scsi_mod xhci_pci ohci_hcd ehci_pci xhci_hcd ehci_hcd r8169 mii usbcore usb_common fan thermal
CPU: 1 PID: 311 Comm: systemd-udevd Not tainted 3.18.0-1.slh.1-aptosid-amd64 #1 aptosid 3.18-5
Hardware name: System manufacturer System Product Name/P8H77-M PRO, BIOS 1503 03/17/2014
 0000000000000009 00000000cedd943b 0000000000000009 ffffffff814ddd08
 ffff8807f06db8a0 ffffffff8105f3fd ffff8807f2091000 ffff8807f00bfa40
 ffff8807f20128e8 ffff8807f20128e8 ffffffffffffffef ffffffff8105f478
Call Trace:
 [<ffffffff814ddd08>] ? dump_stack+0x49/0x6a
 [<ffffffff8105f3fd>] ? warn_slowpath_common+0x6d/0x90
 [<ffffffff8105f478>] ? warn_slowpath_fmt+0x58/0x80
 [<ffffffff811e8042>] ? kernfs_path+0x42/0x50
 [<ffffffff811eb3d5>] ? sysfs_warn_dup+0x55/0x70
 [<ffffffff811eb72e>] ? sysfs_do_create_link_sd.isra.2+0xbe/0xd0
 [<ffffffff81362f24>] ? device_add+0x3b4/0x660
 [<ffffffffa01328ec>] ? rc_register_device+0x1bc/0x600 [rc_core]
 [<ffffffffa0d5bf55>] ? mceusb_dev_probe+0x405/0xadd [mceusb]
 [<ffffffff8126eaf8>] ? ida_get_new_above+0x1f8/0x220
 [<ffffffffa005c69b>] ? usb_probe_interface+0x1ab/0x2d0 [usbcore]
 [<ffffffff81365c87>] ? driver_probe_device+0x87/0x260
 [<ffffffff81365f2b>] ? __driver_attach+0x7b/0x80
 [<ffffffff81365eb0>] ? __device_attach+0x50/0x50
 [<ffffffff81363d4b>] ? bus_for_each_dev+0x6b/0xc0
 [<ffffffff81365428>] ? bus_add_driver+0x178/0x230
 [<ffffffff8136655e>] ? driver_register+0x5e/0xf0
 [<ffffffffa005b04b>] ? usb_register_driver+0x7b/0x160 [usbcore]
 [<ffffffffa0d5f000>] ? 0xffffffffa0d5f000
 [<ffffffffa0d5f000>] ? 0xffffffffa0d5f000
 [<ffffffff81002108>] ? do_one_initcall+0x98/0x200
 [<ffffffff810cf144>] ? load_module+0x1ce4/0x22b0
 [<ffffffff810cc330>] ? __symbol_put+0xa0/0xa0
 [<ffffffff811804de>] ? kernel_read+0x4e/0x80
 [<ffffffff810cf87d>] ? SyS_finit_module+0x8d/0xa0
 [<ffffffff814e3d29>] ? system_call_fastpath+0x12/0x17
---[ end trace 1b9fabfd70d94467 ]---
mceusb 2-1.6:1.0: remote dev registration failed
mceusb 2-1.6:1.0: mceusb_dev_probe: device setup failed!
mceusb: probe of 2-1.6:1.0 failed with error -12
usbcore: registered new interface driver mceusb
dvb-usb: TeVii S480.1 USB successfully deinitialized and disconnected.
usb 6-1: USB disconnect, device number 2
usb 2-1.5: reset high-speed USB device number 3 using ehci-pci
dvb-usb: found a 'TeVii S480.2 USB' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (TeVii S480.2 USB)
dvb-usb: MAC address: 28:28:28:28:28:28
Invalid probe, probably not a DS3000
dvb-usb: no frontend was attached by 'TeVii S480.2 USB'
Registered IR keymap rc-tevii-nec
input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1c.5/0000:04:00.3/usb6/6-1/rc/rc0/input20
rc0: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1c.5/0000:04:00.3/usb6/6-1/rc/rc0
dvb-usb: schedule remote query interval to 150 msecs.
dvb-usb: TeVii S480.2 USB successfully initialized and connected.
usbcore: registered new interface driver dw2102
dvb-usb: TeVii S480.2 USB successfully deinitialized and disconnected.
[...]
usb 1-1.5: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
DVB: registering new adapter (TerraTec Cinergy T USB XE)
i2c i2c-9: af9013: firmware version 5.1.0.0
usb 1-1.5: DVB: registering adapter 0 frontend 0 (Afatech AF9013)...
mc44s803: successfully identified (ID = 14)
usb 1-1.5: dvb_usb_v2: 'TerraTec Cinergy T USB XE' successfully initialized and connected
usbcore: registered new interface driver dvb_usb_af9015
[...]
usb 3-1: new high-speed USB device number 3 using ehci-pci
usb 3-1: config 1 interface 0 altsetting 0 bulk endpoint 0x81 has invalid maxpacket 2
usb 3-1: New USB device found, idVendor=9022, idProduct=d660
usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 3-1: Product: DVBS2BOX
usb 3-1: Manufacturer: TBS-Tech
dvb-usb: found a 'TeVii S660 USB' in cold state, will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-s660.fw'
dw2102: start downloading DW210X firmware
usb 6-1: new high-speed USB device number 3 using ehci-pci
[...]
dvb-usb: found a 'TeVii S660 USB' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (TeVii S660 USB)
usb 6-1: config 1 interface 0 altsetting 0 bulk endpoint 0x81 has invalid maxpacket 2
usb 6-1: New USB device found, idVendor=9022, idProduct=d660
usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 6-1: Product: DVBS2BOX
usb 6-1: Manufacturer: TBS-Tech
dvb-usb: found a 'TeVii S660 USB' in cold state, will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-s660.fw'
dw2102: start downloading DW210X firmware
dvb-usb: found a 'TeVii S660 USB' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (TeVii S660 USB)
dvb-usb: MAC address: 00:18:bd:5a:be:8b
DS3000 chip version: 0.192 attached.
ts2020_attach: Find tuner TS2020!
dw2102: Attached ds3000+ts2020!

usb 3-1: DVB: registering adapter 1 frontend 0 (Montage Technology DS3000)...
Registered IR keymap rc-tevii-nec
input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1c.5/0000:04:00.1/usb3/3-1/rc/rc0/input25
rc0: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1c.5/0000:04:00.1/usb3/3-1/rc/rc0
dvb-usb: schedule remote query interval to 150 msecs.
dvb-usb: TeVii S660 USB successfully initialized and connected.
dvb-usb: MAC address: 00:18:bd:5a:be:8c
DS3000 chip version: 0.192 attached.
ts2020_attach: Find tuner TS2020!
dw2102: Attached ds3000+ts2020!

usb 6-1: DVB: registering adapter 2 frontend 0 (Montage Technology DS3000)...
Registered IR keymap rc-tevii-nec
input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1c.5/0000:04:00.3/usb6/6-1/rc/rc1/input26
rc1: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1c.5/0000:04:00.3/usb6/6-1/rc/rc1
dvb-usb: schedule remote query interval to 150 msecs.
dvb-usb: TeVii S660 USB successfully initialized and connected.
[...]
ds3000_firmware_ondemand: Waiting for firmware upload (dvb-fe-ds3000.fw)...
ds3000_firmware_ondemand: Waiting for firmware upload(2)...
ds3000_firmware_ondemand: Waiting for firmware upload (dvb-fe-ds3000.fw)...
ds3000_firmware_ondemand: Waiting for firmware upload(2)...
[...]

This can be recovered by reloading mceusb
	# modprobe -r mceusb
	# modprobe mceusb

[...]
usbcore: deregistering interface driver mceusb
Registered IR keymap rc-rc6-mce
input: Media Center Ed. eHome Infrared Remote Transceiver (0609:0334) as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/rc/rc2/input27
rc2: Media Center Ed. eHome Infrared Remote Transceiver (0609:0334) as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/rc/rc2
IR Sony protocol handler initialized
IR JVC protocol handler initialized
IR RC5(x/sz) protocol handler initialized
IR RC6 protocol handler initialized
input: MCE IR Keyboard/Mouse (mceusb) as /devices/virtual/input/input28
IR MCE Keyboard/mouse protocol handler initialized
IR NEC protocol handler initialized
IR Sharp protocol handler initialized
IR XMP protocol handler initialized
IR SANYO protocol handler initialized
lirc_dev: IR Remote Control driver registered, major 249 
rc rc2: lirc_dev: driver ir-lirc-codec (mceusb) registered at minor = 0
IR LIRC bridge handler initialized
mceusb 2-1.6:1.0: Registered SMK CORPORATION MCE TRANCEIVR Emulator Device 2006 with mce emulator interface version 1
mceusb 2-1.6:1.0: 2 tx ports (0x0 cabled) and 2 rx sensors (0x1 active)
usbcore: registered new interface driver mceusb
[...]

Regards
	Stefan Lippers-Hollmann

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

* Re: mceusb: sysfs: cannot create duplicate filename '/class/rc/rc0' (race condition between multiple RC_CORE devices)
  2014-12-30 21:11 ` Stefan Lippers-Hollmann
@ 2015-03-30 15:30   ` Stefan Lippers-Hollmann
  2015-03-30 19:33     ` David Härdeman
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Lippers-Hollmann @ 2015-03-30 15:30 UTC (permalink / raw)
  To: linux-media
  Cc: linux-kernel, m.chehab, James Hogan, David Härdeman,
	Antti Seppälä,
	Tomas Melin

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

Hi

This is a follow-up for:
	http://lkml.kernel.org/r/<201412181916.18051.s.L-H@gmx.de>
	http://lkml.kernel.org/r/<201412302211.40801.s.L-H@gmx.de>

On 2014-12-30, Stefan Lippers-Hollmann wrote:
> On Thursday 18 December 2014, Stefan Lippers-Hollmann wrote:
> > Occassionally, but not readily reproducably, I hit a race condition 
> > between mceusb and other connected RC_CORE devices when mceusb tries 
> > to create /class/rc/rc0, which is -by then- already taken by another 
> > RC_CORE device. The other involved IR devices (physically only one)
> > are part of a PCIe TeVii s480 s2.1 twin-tuner DVB-S2 card and aren't 
> > actually supposed to receive IR signals (IR receiver not connected):
> > 
> > mceusb device transceiver:
> > Bus 002 Device 004: ID 0609:0334 SMK Manufacturing, Inc. eHome Infrared Receiver
> > 
> > DVB-T receiver (no RC_CORE device)
> > Bus 001 Device 004: ID 0ccd:0069 TerraTec Electronic GmbH Cinergy T XE (Version 2, AF9015)
> > 
> > twin-tuner DVB-S2 PCIe device, TeVii s480 v2.1 (physically one IR 
> > receiver (NEC protocol), logically recognized as two RC_CORE devices):
> [...]
> > 	Bus 006 Device 003: ID 9022:d660 TeVii Technology Ltd. DVB-S2 S660
> > 	Bus 003 Device 003: ID 9022:d660 TeVii Technology Ltd. DVB-S2 S660

> Today I got a new, similar, trace with kernel 3.18.1, but this is not a
> regression and randomly happens with older kernels as well. The 
> frequency of this occuring differs vastly, this time it was 12 days 
> with probably 20 (re-)boots, before that it didn't happen for multiple
> weeks. I can not totally rule out if it ever happened in the reverse
> detection/ initialisation order, as I wouldn't notice the consequences 
> of dvb_usb_dw2102's RC_CORE devices failing to initialise, but I think
> the problem might be seated in the common core of rc-main.c.

This remains to be a re-occuring issue with kernel 3.19 and 4.0-rc6, 
not happening on every boot, but every few weeks.

[    1.837215] Registered IR keymap rc-rc6-mce
[    1.837225] ------------[ cut here ]------------
[    1.837229] WARNING: CPU: 3 PID: 277 at /tmp/buildd/linux-aptosid-4.0~rc6/fs/sysfs/dir.c:31 sysfs_warn_dup+0x55/0x70()
[    1.837230] sysfs: cannot create duplicate filename '/class/rc/rc0'
[    1.837231] Modules linked in: rt2800usb(+) rt2x00usb rt2800lib rt2x00lib mac80211 cfg80211 rc_rc6_mce crc_ccitt mceusb(+) rc_tevii_nec ds3000 btusb dvb_usb_af9015 dvb_usb_v2 bluetooth nls_utf8 nls_cp437 vfat fat snd_hda_codec_hdmi iTCO_wdt eeepc_wmi iTCO_vendor_support asus_wmi sparse_keymap intel_rapl rfkill iosf_mbi x86_pkg_temp_thermal intel_powerclamp evdev coretemp snd_hda_codec_realtek snd_hda_codec_generic kvm_intel kvm crct10dif_pclmul crc32_pclmul ghash_clmulni_intel dvb_usb_dw2102 dvb_usb aesni_intel aes_x86_64 lrw dvb_core gf128mul rc_core snd_hda_intel glue_helper i915 ablk_helper snd_hda_controller cryptd snd_hda_codec i2c_algo_bit psmouse snd_hwdep drm_kms_helper snd_pcm serio_raw pcspkr i2c_i801 drm snd_timer lpc_ich snd i2c_core mfd_core soundcore intel_gtt mei_me battery ie31200_edac
[    1.837253]  mei 8250_fintek edac_core tpm_infineon video wmi processor button nct6775 hwmon_vid fuse parport_pc ppdev lp parport autofs4 ext4 crc16 jbd2 mbcache dm_mod sg sd_mod ohci_pci crc32c_intel ahci libahci libata xhci_pci scsi_mod ohci_hcd ehci_pci xhci_hcd ehci_hcd r8169 mii usbcore usb_common fan thermal
[    1.837267] CPU: 3 PID: 277 Comm: systemd-udevd Not tainted 4.0.0-rc6-aptosid-amd64 #1 aptosid 4.0~rc6-1~git0.slh.1
[    1.837268] Hardware name: System manufacturer System Product Name/P8H77-M PRO, BIOS 1503 03/17/2014
[    1.837269]  ffffffff816236d0 0000000054e7a09b ffffffff816236d0 ffffffff814fb0ee
[    1.837271]  ffff8807fb643880 ffffffff81060627 ffff8807fbe5c000 ffff8807fbe2ee78
[    1.837272]  ffff8807f93a07f8 ffff8807f93a07f8 ffffffffffffffef ffffffff810606b8
[    1.837273] Call Trace:
[    1.837277]  [<ffffffff814fb0ee>] ? dump_stack+0x47/0x67
[    1.837279]  [<ffffffff81060627>] ? warn_slowpath_common+0x77/0xb0
[    1.837280]  [<ffffffff810606b8>] ? warn_slowpath_fmt+0x58/0x80
[    1.837282]  [<ffffffff811ea562>] ? kernfs_path+0x42/0x50
[    1.837284]  [<ffffffff811ed975>] ? sysfs_warn_dup+0x55/0x70
[    1.837286]  [<ffffffff811edcce>] ? sysfs_do_create_link_sd.isra.2+0xbe/0xd0
[    1.837287]  [<ffffffff813887a4>] ? device_add+0x264/0x640
[    1.837291]  [<ffffffffa09c38dc>] ? rc_register_device+0x1bc/0x610 [rc_core]
[    1.837293]  [<ffffffffa0861f55>] ? mceusb_dev_probe+0x405/0xadd [mceusb]
[    1.837296]  [<ffffffff81271aa8>] ? ida_get_new_above+0x1f8/0x220
[    1.837298]  [<ffffffff81271b69>] ? ida_simple_get+0x99/0x120
[    1.837304]  [<ffffffffa0036763>] ? usb_probe_interface+0x193/0x290 [usbcore]
[    1.837306]  [<ffffffff8138b647>] ? driver_probe_device+0x87/0x260
[    1.837309]  [<ffffffff8138b8eb>] ? __driver_attach+0x7b/0x80
[    1.837311]  [<ffffffff8138b870>] ? __device_attach+0x50/0x50
[    1.837312]  [<ffffffff813896fb>] ? bus_for_each_dev+0x6b/0xc0
[    1.837313]  [<ffffffff8138ade8>] ? bus_add_driver+0x178/0x230
[    1.837315]  [<ffffffff8138bf1e>] ? driver_register+0x5e/0xf0
[    1.837319]  [<ffffffffa003514b>] ? usb_register_driver+0x7b/0x160 [usbcore]
[    1.837321]  [<ffffffffa0865000>] ? 0xffffffffa0865000
[    1.837323]  [<ffffffffa0865000>] ? 0xffffffffa0865000
[    1.837325]  [<ffffffff81002108>] ? do_one_initcall+0x98/0x1f0
[    1.837327]  [<ffffffff814fa016>] ? do_init_module+0x50/0x1b0
[    1.837329]  [<ffffffff810d1df3>] ? load_module+0x1b03/0x2030
[    1.837331]  [<ffffffff810cf240>] ? __symbol_put+0x70/0x70
[    1.837333]  [<ffffffff811819ae>] ? kernel_read+0x4e/0x80
[    1.837334]  [<ffffffff810d248d>] ? SyS_finit_module+0x8d/0xa0
[    1.837336]  [<ffffffff81500e49>] ? system_call_fastpath+0x12/0x17
[    1.837337] ---[ end trace 158112bdd663741e ]---
[    1.837347] mceusb 2-1.6:1.0: remote dev registration failed
[    1.837370] mceusb 2-1.6:1.0: mceusb_dev_probe: device setup failed!
[    1.837392] mceusb: probe of 2-1.6:1.0 failed with error -12
[    1.837410] usbcore: registered new interface driver mceusb

Regards
	Stefan Lippers-Hollmann

[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: mceusb: sysfs: cannot create duplicate filename '/class/rc/rc0'  (race condition between multiple RC_CORE devices)
  2015-03-30 15:30   ` Stefan Lippers-Hollmann
@ 2015-03-30 19:33     ` David Härdeman
  2015-03-30 20:21       ` Stefan Lippers-Hollmann
  0 siblings, 1 reply; 6+ messages in thread
From: David Härdeman @ 2015-03-30 19:33 UTC (permalink / raw)
  To: Stefan Lippers-Hollmann
  Cc: linux-media, linux-kernel, m.chehab, James Hogan,
	Antti Seppälä,
	Tomas Melin

On 2015-03-30 17:30, Stefan Lippers-Hollmann wrote:
> Hi
> 
> This is a follow-up for:
> 	http://lkml.kernel.org/r/<201412181916.18051.s.L-H@gmx.de>
> 	http://lkml.kernel.org/r/<201412302211.40801.s.L-H@gmx.de>
> 

I can't swear that it's the case but I'm guessing this might be fixed by 
the patches I posted earlier (in particular the one that converted 
rc-core to use the IDA infrastructure for keeping track of registered 
minor device numbers).

//D



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

* Re: mceusb: sysfs: cannot create duplicate filename '/class/rc/rc0' (race condition between multiple RC_CORE devices)
  2015-03-30 19:33     ` David Härdeman
@ 2015-03-30 20:21       ` Stefan Lippers-Hollmann
  2015-03-30 20:26         ` David Härdeman
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Lippers-Hollmann @ 2015-03-30 20:21 UTC (permalink / raw)
  To: David Härdeman
  Cc: linux-media, linux-kernel, m.chehab, James Hogan,
	Antti Seppälä,
	Tomas Melin

Hi

On 2015-03-30, David Härdeman wrote:
> On 2015-03-30 17:30, Stefan Lippers-Hollmann wrote:
> > Hi
> > 
> > This is a follow-up for:
> > 	http://lkml.kernel.org/r/<201412181916.18051.s.L-H@gmx.de>
> > 	http://lkml.kernel.org/r/<201412302211.40801.s.L-H@gmx.de>
> 
> I can't swear that it's the case but I'm guessing this might be fixed by 
> the patches I posted earlier (in particular the one that converted 
> rc-core to use the IDA infrastructure for keeping track of registered 
> minor device numbers).

Do you have a pointer to that patch (-queue) or a tree containing it?
So far I've only found https://patchwork.linuxtv.org/patch/23370/
with those keywords, respectively the thread at 
http://comments.gmane.org/gmane.linux.drivers.video-input-infrastructure/76514
which seems to be partially applied, anything I could test (reproducing
the problem takes its time, probably 4-10 weeks to be really sure, but 
I'd be happy to try or forward port the required parts).

Thanks a lot
	Stefan Lippers-Hollmann

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

* Re: mceusb: sysfs: cannot create duplicate filename '/class/rc/rc0'  (race condition between multiple RC_CORE devices)
  2015-03-30 20:21       ` Stefan Lippers-Hollmann
@ 2015-03-30 20:26         ` David Härdeman
  0 siblings, 0 replies; 6+ messages in thread
From: David Härdeman @ 2015-03-30 20:26 UTC (permalink / raw)
  To: Stefan Lippers-Hollmann
  Cc: linux-media, linux-kernel, m.chehab, James Hogan,
	Antti Seppälä,
	Tomas Melin

On 2015-03-30 22:21, Stefan Lippers-Hollmann wrote:
> On 2015-03-30, David Härdeman wrote:
>> On 2015-03-30 17:30, Stefan Lippers-Hollmann wrote:
>> > This is a follow-up for:
>> > 	http://lkml.kernel.org/r/<201412181916.18051.s.L-H@gmx.de>
>> > 	http://lkml.kernel.org/r/<201412302211.40801.s.L-H@gmx.de>
>> 
>> I can't swear that it's the case but I'm guessing this might be fixed 
>> by
>> the patches I posted earlier (in particular the one that converted
>> rc-core to use the IDA infrastructure for keeping track of registered
>> minor device numbers).
> 
> Do you have a pointer to that patch (-queue) or a tree containing it?
> So far I've only found https://patchwork.linuxtv.org/patch/23370/
> with those keywords, respectively the thread at
> http://comments.gmane.org/gmane.linux.drivers.video-input-infrastructure/76514
> which seems to be partially applied, anything I could test (reproducing
> the problem takes its time, probably 4-10 weeks to be really sure, but
> I'd be happy to try or forward port the required parts).

Hi,

I can try providing you with an updated version of the patch when I have 
time...otherwise I think you've found all that can be found :)

//David


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

end of thread, other threads:[~2015-03-30 20:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-18 18:16 mceusb: sysfs: cannot create duplicate filename '/class/rc/rc0' (race condition between multiple RC_CORE devices) Stefan Lippers-Hollmann
2014-12-30 21:11 ` Stefan Lippers-Hollmann
2015-03-30 15:30   ` Stefan Lippers-Hollmann
2015-03-30 19:33     ` David Härdeman
2015-03-30 20:21       ` Stefan Lippers-Hollmann
2015-03-30 20:26         ` David Härdeman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).