[mythtv-users] Udev

Daryl McDonald darylangela at gmail.com
Wed Nov 28 16:40:26 UTC 2018


On Wed, Nov 28, 2018 at 11:09 AM Matt Zagrabelny <mzagrabe at d.umn.edu> wrote:

>
>
> On Wed, Nov 28, 2018 at 9:54 AM Daryl McDonald <darylangela at gmail.com>
> wrote:
>
>> How do working rules not match udevadm info queries?
>>
>> SUBSYSTEM=="dvb", ATTRS{device}=="0x8852", PROGRAM="/bin/sh -c 'K=%k;
>> K=$${K#dvb}; printf dvb/adapterHP1250/%%s $${K#*.}; exit 0'", SYMLINK+="%c"
>>
>> SUBSYSTEM=="dvb", ATTRS{device}=="0x8802", PROGRAM="/bin/sh -c 'K=%k;
>> K=$${K#dvb}; printf dvb/adapterPC800i/%%s $${K#*.}; exit 0'", SYMLINK+="%c"
>>
>> Above are my working rules and below is the udevadm query:
>>
>
> What is the query?
>
> "udevadm info -q ????" or something similar?
>
>
>> looking at device
>> '/devices/pci0000:00/0000:00:04.0/0000:02:00.0/dvb/dvb0.dvr0':
>>
>>     KERNEL=="dvb0.dvr0"
>>
>>     SUBSYSTEM=="dvb"
>>
>>     DRIVER==""
>>
>>
>>   looking at parent device
>> '/devices/pci0000:00/0000:00:04.0/0000:02:00.0':
>>
>>     KERNELS=="0000:02:00.0"
>>
>>     SUBSYSTEMS=="pci"
>>
>>     DRIVERS=="cx23885"
>>
>>     ATTRS{broken_parity_status}=="0"
>>
>>     ATTRS{class}=="0x040000"
>>
>>     ATTRS{consistent_dma_mask_bits}=="32"
>>
>>     ATTRS{current_link_speed}=="2.5 GT/s"
>>
>>     ATTRS{current_link_width}=="1"
>>
>>     ATTRS{d3cold_allowed}=="1"
>>
>>     ATTRS{device}=="0x8852"
>>
>>     ATTRS{dma_mask_bits}=="32"
>>
>>     ATTRS{driver_override}=="(null)"
>>
>>     ATTRS{enable}=="1"
>>
>>     ATTRS{irq}=="16"
>>
>>     ATTRS{local_cpulist}=="0-2"
>>
>>     ATTRS{local_cpus}=="07"
>>
>>     ATTRS{max_link_speed}=="2.5 GT/s"
>>
>>     ATTRS{max_link_width}=="1"
>>
>>     ATTRS{msi_bus}=="1"
>>
>>     ATTRS{numa_node}=="0"
>>
>>     ATTRS{revision}=="0x04"
>>
>>     ATTRS{subsystem_device}=="0x7911"
>>
>>     ATTRS{subsystem_vendor}=="0x0070"
>>
>>     ATTRS{vendor}=="0x14f1"
>>
>>
>>   looking at parent device '/devices/pci0000:00/0000:00:04.0':
>>
>>     KERNELS=="0000:00:04.0"
>>
>>     SUBSYSTEMS=="pci"
>>
>>     DRIVERS=="pcieport"
>>
>>     ATTRS{broken_parity_status}=="0"
>>
>>     ATTRS{class}=="0x060400"
>>
>>     ATTRS{consistent_dma_mask_bits}=="32"
>>
>>     ATTRS{current_link_speed}=="2.5 GT/s"
>>
>>     ATTRS{current_link_width}=="1"
>>
>>     ATTRS{d3cold_allowed}=="1"
>>
>>     ATTRS{device}=="0x9604"
>>
>>     ATTRS{dma_mask_bits}=="32"
>>
>>     ATTRS{driver_override}=="(null)"
>>
>>     ATTRS{enable}=="1"
>>
>>     ATTRS{irq}=="16"
>>
>>     ATTRS{local_cpulist}=="0-2"
>>
>>     ATTRS{local_cpus}=="07"
>>
>>     ATTRS{max_link_speed}=="5 GT/s"
>>
>>     ATTRS{max_link_width}=="1"
>>
>>     ATTRS{msi_bus}=="1"
>>
>>     ATTRS{numa_node}=="0"
>>
>>     ATTRS{revision}=="0x00"
>>
>>     ATTRS{secondary_bus_number}=="2"
>>
>>     ATTRS{subordinate_bus_number}=="2"
>>
>>     ATTRS{subsystem_device}=="0x2285"
>>
>>     ATTRS{subsystem_vendor}=="0x1019"
>>
>>     ATTRS{vendor}=="0x1022"
>>
>>
>>   looking at parent device '/devices/pci0000:00':
>>
>>     KERNELS=="pci0000:00"
>>
>>     SUBSYSTEMS==""
>>
>>     DRIVERS==""
>>
>>
>> I need to understand this before creating new rules for the introduction
>> of new cards.
>>
>> On Tue, Nov 27, 2018 at 8:47 AM Ian Campbell <ijc at hellion.org.uk> wrote:
>>
>>> On Tue, 2018-11-27 at 08:17 -0500, Daryl McDonald wrote:
>>> > In  previous set up with two sources, and cards staying in the same
>>> > slots, enumeration would, on occasion, be different. Stephan, are you
>>> > saying that is now different?
>>> > Of four tuners, there will be one HP1250, one HP winTV, and two
>>> > PCi800's, the last two of which may have no differences, but I may
>>> > try and find some (for hind-sight diagnostics)
>>>
>>> Even in the absence of USB devices masquerading as PCI cards the
>>> loading of drivers, and therefore the binding of driver→device, is
>>> asynchronous, and therefore the assignment of DVB adapter IDs can vary
>>> depending on the order they get discovered in.
>>>
>>> Personally I deal with this using module options rather than udev:
>>>    # cat /etc/modprobe.d/dvb-usb-dib0700.conf
>>>    options dvb-usb-dib0700 adapter_nr=0,1,2,3
>>>    options em28xx-dvb adapter_nr=4,5,6,7
>>>
>>> This ensures that adaptors 0-3 are always the dib0700 ones and adaptors
>>> 4-7 are always the em28xx ones, but makes no guarantee about which
>>> dib0700 will be adaptor #3 etc. That's all I care about because the
>>> em28xx ones are HD capable while the dib0700 ones are not.
>>>
>>> This works well enough for me, but it does mean that if one adaptor is
>>> flakey then it can switch around (within its corresponding set of ids)
>>> on reboot.
>>>
>>> If your three classes of card use three different drivers then you
>>> ought to be able to arrange that the HP1250=adaptor#0, the
>>> winTV=adaptor#1 and the PCi800's are #2 and #3 (in some order).
>>>
>>> Ian.
>>>
>>>
>>>
>>> _______________________________________________
>>> mythtv-users mailing list
>>> mythtv-users at mythtv.org
>>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>>> http://wiki.mythtv.org/Mailing_List_etiquette
>>> MythTV Forums: https://forum.mythtv.org
>>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
>>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org


Yes:  udevadm info -a -p $(udevadm info -q path -n /dev/dvb/adapter0/dvr0)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20181128/e493415d/attachment.html>


More information about the mythtv-users mailing list