<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-GB link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>All,<o:p></o:p></p>

<p class=MsoNormal>I have tried to resolve this on the &#8220;Linux-DVB&#8221;
and &nbsp;Hotplug &#8220;UDEV&#8221; lists, now trying on the Fedora Forum (<a
href="http://forums.fedoraforum.org/showthread.php?t=160840"><span
style='color:windowtext;text-decoration:none'>http://forums.fedoraforum.org/showthread.php?t=160840</span></a>)
so thought I might as well ask here as it&#8217;s my desire for a working
MythTV setup thats causing the issue!<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I have a problem whereby I need to pin a specific DVB PCI
card by PCI slot/PCI address to a dvb node (/dev/dvb/adaptor*), at the moment
my system has two (almost identical) cards from the same manufacturer
(TechnoTrend/Hauppauge), however one is DVB-T and one is DVB-S. <br>
As far as udev is concerned they report similarly, so things get really messed
up when on one boot, the DVB-T is /dev/dvb/adaptor0 and the DVB-S is
/dev/dvb/adaptor1 on the next boot they are reversed (the DVB-T is
/dev/dvb/adaptor1 and the DVB-S is /dev/dvb/adaptor0).<br>
<br>
I am really not passionate about whether I use UDEV or load modules manually to
achieve my objective of persistent mapping of PCI Slots/PCI addresses to DVB
node&#8217;s. The latter is probably preferable, as I have been bugging guys on
the UDEV mailing list for months, and I just can&#8217;t get things to play
nice in Fedora, although I am assured things work in Gentoo.<br>
<span style='color:black'><br>
If I allow the standard UDEV rules to run, and execute &quot;</span><span
style='color:darkred'>udevinfo -a -p $(udevinfo -q path -n
/dev/dvb/adapter0/frontend0)</span><span style='color:black'>&quot; the
response is - <o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='color:navy'>looking
at device '/class/dvb/dvb0.frontend0':<br>
KERNEL==&quot;dvb0.frontend0&quot;<br>
SUBSYSTEM==&quot;dvb&quot;<br>
DRIVER==&quot;&quot;<br>
ATTR{dev}==&quot;212:3&quot;<br>
<br>
looking at parent device '/devices/pci0000:00/0000:00:10.0/0000:01:06.0':<br>
KERNELS==&quot;0000:01:06.0&quot;<br>
SUBSYSTEMS==&quot;pci&quot;<br>
DRIVERS==&quot;budget_ci dvb&quot;<br>
ATTRS{msi_bus}==&quot;&quot;<br>
ATTRS{broken_parity_status}==&quot;0&quot;<br>
ATTRS{enable}==&quot;1&quot;<br>
ATTRS{modalias}==&quot;pci:v00001131d00007146sv000013C2sd00001017bc04sc80
i00&quot;<br>
ATTRS{local_cpus}==&quot;ffffffff&quot;<br>
ATTRS{irq}==&quot;20&quot;<br>
ATTRS{class}==&quot;0x048000&quot;<br>
ATTRS{subsystem_device}==&quot;0x1017&quot;<br>
ATTRS{subsystem_vendor}==&quot;0x13c2&quot;<br>
ATTRS{device}==&quot;0x7146&quot;<br>
ATTRS{vendor}==&quot;0x1131&quot;<br>
<br>
looking at parent device '/devices/pci0000:00/0000:00:10.0':<br>
KERNELS==&quot;0000:00:10.0&quot;<br>
SUBSYSTEMS==&quot;pci&quot;<br>
DRIVERS==&quot;&quot;<br>
ATTRS{msi_bus}==&quot;1&quot;<br>
ATTRS{broken_parity_status}==&quot;0&quot;<br>
ATTRS{enable}==&quot;1&quot;<br>
ATTRS{modalias}==&quot;pci:v000010DEd0000026Fsv00000000sd00000000bc06sc04
i01&quot;<br>
ATTRS{local_cpus}==&quot;ffffffff&quot;<br>
ATTRS{irq}==&quot;0&quot;<br>
ATTRS{class}==&quot;0x060401&quot;<br>
ATTRS{subsystem_device}==&quot;0x0000&quot;<br>
ATTRS{subsystem_vendor}==&quot;0x0000&quot;<br>
ATTRS{device}==&quot;0x026f&quot;<br>
ATTRS{vendor}==&quot;0x10de&quot;<br>
<br>
looking at parent device '/devices/pci0000:00':<br>
KERNELS==&quot;pci0000:00&quot;<br>
SUBSYSTEMS==&quot;&quot;<br>
DRIVERS==&quot;&quot;<br>
<br>
looking at device '/class/dvb/dvb1.frontend0':<br>
KERNEL==&quot;dvb1.frontend0&quot;<br>
SUBSYSTEM==&quot;dvb&quot;<br>
DRIVER==&quot;&quot;<br>
ATTR{dev}==&quot;212:67&quot;</span><span style='color:black'><o:p></o:p></span></p>

<p class=MsoNormal><span style='color:black'><br>
The other adaptor yields the following response (to &quot;</span><span
style='color:darkred'>udevinfo -a -p $(udevinfo -q path -n
/dev/dvb/adapter1/frontend0)</span><span style='color:black'>&quot;)- <o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='color:navy'>looking
at parent device '/devices/pci0000:00/0000:00:10.0/0000:01:08.0':<br>
KERNELS==&quot;0000:01:08.0&quot;<br>
SUBSYSTEMS==&quot;pci&quot;<br>
DRIVERS==&quot;budget dvb&quot;<br>
ATTRS{msi_bus}==&quot;&quot;<br>
ATTRS{broken_parity_status}==&quot;0&quot;<br>
ATTRS{enable}==&quot;1&quot;<br>
ATTRS{modalias}==&quot;pci:v00001131d00007146sv000013C2sd00001005bc04sc80
i00&quot;<br>
ATTRS{local_cpus}==&quot;ffffffff&quot;<br>
ATTRS{irq}==&quot;21&quot;<br>
ATTRS{class}==&quot;0x048000&quot;<br>
ATTRS{subsystem_device}==&quot;0x1005&quot;<br>
ATTRS{subsystem_vendor}==&quot;0x13c2&quot;<br>
ATTRS{device}==&quot;0x7146&quot;<br>
ATTRS{vendor}==&quot;0x1131&quot;<br>
<br>
looking at parent device '/devices/pci0000:00/0000:00:10.0':<br>
KERNELS==&quot;0000:00:10.0&quot;<br>
SUBSYSTEMS==&quot;pci&quot;<br>
DRIVERS==&quot;&quot;<br>
ATTRS{msi_bus}==&quot;1&quot;<br>
ATTRS{broken_parity_status}==&quot;0&quot;<br>
ATTRS{enable}==&quot;1&quot;<br>
ATTRS{modalias}==&quot;pci:v000010DEd0000026Fsv00000000sd00000000bc06sc04
i01&quot;<br>
ATTRS{local_cpus}==&quot;ffffffff&quot;<br>
ATTRS{irq}==&quot;0&quot;<br>
ATTRS{class}==&quot;0x060401&quot;<br>
ATTRS{subsystem_device}==&quot;0x0000&quot;<br>
ATTRS{subsystem_vendor}==&quot;0x0000&quot;<br>
ATTRS{device}==&quot;0x026f&quot;<br>
ATTRS{vendor}==&quot;0x10de&quot;<br>
<br>
looking at parent device '/devices/pci0000:00':<br>
KERNELS==&quot;pci0000:00&quot;<br>
SUBSYSTEMS==&quot;&quot;<br>
DRIVERS==&quot;&quot;</span><span style='color:black'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='color:black'><br>
For those interested the following config apparently should work according to
peeps off the UDEV list &#8211; <br>
<br>
My DVB section of /etc/udev/rules.d/50-udev.rules is as follows - </span><span
style='color:purple'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='color:purple'># DVB<br>
KERNEL==&quot;dvb&quot;, MODE=&quot;0660&quot;<br>
SUBSYSTEM!=&quot;dvb&quot;, GOTO=&quot;dvb_end&quot;<br>
ACTION!=&quot;add&quot;, GOTO=&quot;dvb_end&quot;<br>
<br>
GROUP=&quot;video&quot;<br>
import{PROGRAM}=&quot;/bin/sh -c 'K=%k; K=$${K#dvb}; echo
ID_DVB_ADAPTER_KERNEL=$${K%%%%.*}; echo ID_DVB_DEVICE=$${K#*.}'&quot;<br>
<br>
IMPORT{program}=&quot;path_id %p&quot;<br>
<br>
#Here set ID_DVB_ADAPTER to be persistent # example:<br>
ENV{ID_PATH}==&quot;pci-0000:01:08.0&quot;, ENV{ID_DVB_ADAPTER}=&quot;3&quot;<br>
ENV{ID_PATH}==&quot;pci-0000:01:06.0&quot;, ENV{ID_DVB_ADAPTER}=&quot;2&quot;<br>
<br>
# fallback-number<br>
ENV{ID_DVB_ADAPTER_KERNEL}==&quot;?*&quot;,
ENV{ID_DVB_ADAPTER}!=&quot;?*&quot;,
ENV{ID_DVB_ADAPTER}=&quot;$env{ID_DVB_ADAPTER_KERNEL}&quot;<br>
<br>
# Create device<br>
ENV{ID_DVB_ADAPTER}==&quot;?*&quot;, ENV{ID_DVB_DEVICE}==&quot;?*&quot;,
NAME=&quot;dvb/adapter$env{ID_DVB_ADAPTER}/$env{ID_DVB_DEVICE}&quot;<br>
<br>
LABEL=&quot;dvb_end&quot;<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='color:black'><br>
I have updated the final section of /sbin/path_id (when I was playing with FC5)
to - </span><span style='color:purple'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='color:purple'>case
&quot;$TYPE&quot; in<br>
block)<br>
handle_block<br>
;;<br>
dvb)<br>
handle_device<br>
echo &quot;ID_PATH=$d&quot;<br>
;;<br>
*)<br>
RESULT=1<br>
;;<br>
esac<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='color:black'><br>
or more recently /lib/udev/path_id in F7, to - </span><span style='color:purple'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='color:purple'>case
&quot;$TYPE&quot; in<br>
block)<br>
handle_device<br>
echo &quot;ID_PATH=$d&quot;<br>
;;<br>
dvb)<br>
handle_device<br>
echo &quot;ID_PATH=$d&quot;<br>
;;<br>
scsi_tape)<br>
handle_device<br>
echo &quot;ID_PATH=$d&quot;<br>
;;<br>
input)<br>
handle_device<br>
echo &quot;ID_PATH=$d&quot;<br>
;;<br>
*)<br>
RESULT=1<br>
;;<br>
esac<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:black'><br>
Unfortunately the dvb adaptors still load as 0 and 1 as opposed to 2 and 3 as
expected.<br>
<br>
HELP!!<o:p></o:p></span></p>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

</body>

</html>