<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Nov 28, 2018 at 9:54 AM Daryl McDonald <<a href="mailto:darylangela@gmail.com">darylangela@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">How do working rules not match udevadm info queries?<div>
        
        


<p style="margin-bottom:0cm;line-height:100%">SUBSYSTEM=="dvb",
ATTRS{device}=="0x8852", PROGRAM="/bin/sh -c 'K=%k;
K=$${K#dvb}; printf dvb/adapterHP1250/%%s $${K#*.}; exit 0'",
SYMLINK+="%c"</p>
<p style="margin-bottom:0cm;line-height:100%">SUBSYSTEM=="dvb",
ATTRS{device}=="0x8802", PROGRAM="/bin/sh -c 'K=%k;
K=$${K#dvb}; printf dvb/adapterPC800i/%%s $${K#*.}; exit 0'",
SYMLINK+="%c"</p><p style="margin-bottom:0cm;line-height:100%">Above are my working rules and below is the udevadm query:</p></div></div></blockquote><div><br></div><div>What is the query?</div><div><br></div><div>"udevadm info -q ????" or something similar?</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><p style="margin-bottom:0cm;line-height:100%">looking at device
'/devices/pci0000:00/0000:00:04.0/0000:02:00.0/dvb/dvb0.dvr0':</p><p style="margin-bottom:0cm;line-height:100%">   
KERNEL=="dvb0.dvr0"</p><p style="margin-bottom:0cm;line-height:100%">   
SUBSYSTEM=="dvb"</p><p style="margin-bottom:0cm;line-height:100%">   
DRIVER==""</p><p style="margin-bottom:0cm;line-height:100%"><br>

</p><p style="margin-bottom:0cm;line-height:100%">  looking at
parent device '/devices/pci0000:00/0000:00:04.0/0000:02:00.0':</p><p style="margin-bottom:0cm;line-height:100%">   
KERNELS=="0000:02:00.0"</p><p style="margin-bottom:0cm;line-height:100%">   
SUBSYSTEMS=="pci"</p><p style="margin-bottom:0cm;line-height:100%">   
DRIVERS=="cx23885"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{broken_parity_status}=="0"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{class}=="0x040000"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{consistent_dma_mask_bits}=="32"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{current_link_speed}=="2.5 GT/s"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{current_link_width}=="1"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{d3cold_allowed}=="1"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{device}=="0x8852"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{dma_mask_bits}=="32"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{driver_override}=="(null)"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{enable}=="1"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{irq}=="16"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{local_cpulist}=="0-2"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{local_cpus}=="07"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{max_link_speed}=="2.5 GT/s"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{max_link_width}=="1"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{msi_bus}=="1"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{numa_node}=="0"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{revision}=="0x04"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{subsystem_device}=="0x7911"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{subsystem_vendor}=="0x0070"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{vendor}=="0x14f1"</p><p style="margin-bottom:0cm;line-height:100%"><br>

</p><p style="margin-bottom:0cm;line-height:100%">  looking at
parent device '/devices/pci0000:00/0000:00:04.0':</p><p style="margin-bottom:0cm;line-height:100%">   
KERNELS=="0000:00:04.0"</p><p style="margin-bottom:0cm;line-height:100%">   
SUBSYSTEMS=="pci"</p><p style="margin-bottom:0cm;line-height:100%">   
DRIVERS=="pcieport"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{broken_parity_status}=="0"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{class}=="0x060400"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{consistent_dma_mask_bits}=="32"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{current_link_speed}=="2.5 GT/s"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{current_link_width}=="1"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{d3cold_allowed}=="1"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{device}=="0x9604"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{dma_mask_bits}=="32"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{driver_override}=="(null)"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{enable}=="1"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{irq}=="16"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{local_cpulist}=="0-2"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{local_cpus}=="07"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{max_link_speed}=="5 GT/s"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{max_link_width}=="1"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{msi_bus}=="1"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{numa_node}=="0"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{revision}=="0x00"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{secondary_bus_number}=="2"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{subordinate_bus_number}=="2"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{subsystem_device}=="0x2285"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{subsystem_vendor}=="0x1019"</p><p style="margin-bottom:0cm;line-height:100%">   
ATTRS{vendor}=="0x1022"</p><p style="margin-bottom:0cm;line-height:100%"><br>

</p><p style="margin-bottom:0cm;line-height:100%">  looking at
parent device '/devices/pci0000:00':</p><p style="margin-bottom:0cm;line-height:100%">   
KERNELS=="pci0000:00"</p><p style="margin-bottom:0cm;line-height:100%">   
SUBSYSTEMS==""</p><p style="margin-bottom:0cm;line-height:100%">
        
        
































































</p><p style="margin-bottom:0cm;line-height:100%">    DRIVERS==""</p><p style="margin-bottom:0cm;line-height:100%"><br></p><p style="margin-bottom:0cm;line-height:100%">I need to understand this before creating new rules for the introduction of new cards.</p></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 27, 2018 at 8:47 AM Ian Campbell <<a href="mailto:ijc@hellion.org.uk" target="_blank">ijc@hellion.org.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 2018-11-27 at 08:17 -0500, Daryl McDonald wrote:<br>
> In  previous set up with two sources, and cards staying in the same<br>
> slots, enumeration would, on occasion, be different. Stephan, are you<br>
> saying that is now different?<br>
> Of four tuners, there will be one HP1250, one HP winTV, and two<br>
> PCi800's, the last two of which may have no differences, but I may<br>
> try and find some (for hind-sight diagnostics)<br>
<br>
Even in the absence of USB devices masquerading as PCI cards the<br>
loading of drivers, and therefore the binding of driver→device, is<br>
asynchronous, and therefore the assignment of DVB adapter IDs can vary<br>
depending on the order they get discovered in.<br>
<br>
Personally I deal with this using module options rather than udev:<br>
   # cat /etc/modprobe.d/dvb-usb-dib0700.conf <br>
   options dvb-usb-dib0700 adapter_nr=0,1,2,3<br>
   options em28xx-dvb adapter_nr=4,5,6,7<br>
<br>
This ensures that adaptors 0-3 are always the dib0700 ones and adaptors<br>
4-7 are always the em28xx ones, but makes no guarantee about which<br>
dib0700 will be adaptor #3 etc. That's all I care about because the<br>
em28xx ones are HD capable while the dib0700 ones are not.<br>
<br>
This works well enough for me, but it does mean that if one adaptor is<br>
flakey then it can switch around (within its corresponding set of ids)<br>
on reboot.<br>
<br>
If your three classes of card use three different drivers then you<br>
ought to be able to arrange that the HP1250=adaptor#0, the<br>
winTV=adaptor#1 and the PCi800's are #2 and #3 (in some order).<br>
<br>
Ian.<br>
<br>
<br>
<br>
_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" rel="noreferrer" target="_blank">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" rel="noreferrer" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" rel="noreferrer" target="_blank">https://forum.mythtv.org</a><br>
</blockquote></div>
_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" rel="noreferrer" target="_blank">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" rel="noreferrer" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" rel="noreferrer" target="_blank">https://forum.mythtv.org</a><br>
</blockquote></div></div>