Re: node pinning HELP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Razza wrote on 26 April 2007 21:42:
> All,
> I have a problem whereby I need to pin a specific PCI card (slot) to a
> dvb
> node, otherwise it totally messes up my machine when a historic DVB-S
> node
> becomes a DVB-T node or vice versa.
> 
> I have been playing with udev and have found how to identify cards etc.
> But
> getting the (NAME) rule right is confusing me. I am running Fedora Core
> 5
> and have the following standard rule in "/etc/udev/rules.d/50-
> udev.rules" -
> 
> SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf
> dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0660"
> 
> The closest I got to getting things working was by substituting
> "dvb/adapter%%i/" with "dvb/adapter5/", thus forcing the adapter to
> /dev/dvb/adapter5, rule below -
> 
> BUS=="pci", ID=="0000:01:06.0", SYSFS{device}=="0x7146",
> SYSFS{vendor}=="0x1131", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf
> dvb/adapter5/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0660"
> 
> Unfortunately that changed the tree structure from -
> 
> /dev/dvb/
> `-- adapter5
>     |-- ca0
>     |-- demux0
>     |-- dvr0
>     |-- frontend0
>     `-- net0
> 
> To -
> 
> /dev/dvb/
> `-- adapter5
>     |-- 0dvb
>     |   `-- adapter5
>     |       |-- ca0
>     |       |-- demux0
>     |       |-- dvr0
>     |       |-- frontend0
>     |       `-- net0
>     `-- event3dvb
>         `-- adapter5
>             `-- event3
> 
> Can anyone please advise on what the rule should look like?
> 
> Thanks in advance.

I have been trying suggestions from the UDEV list peeps (mainly a really
helpful chap named Matthias). 
Frankly I really don't care whether I use UDEV or not, all I want is two
(more going forward) DVB cards that stay pinned to their respective nodes
based on their PCI address. Can anyone advise how to blacklist these cards
and load them manually to achieve my goal?
Please see below my latest posting to the UDEV list, for additional
information.

All,
I am still struggling to get my DVB cards to load appropriately. 
My DVB section of /etc/udev/rules.d/50-udev.rules is as follows - 

################################# /etc/udev/rules.d/50-udev.rules
############################### # DVB
KERNEL=="dvb",                  MODE="0660"
SUBSYSTEM!="dvb", GOTO="dvb_end"
ACTION!="add", GOTO="dvb_end"

GROUP="video"
import{PROGRAM}="/bin/sh -c 'K=%k; K=$${K#dvb}; echo
ID_DVB_ADAPTER_KERNEL=$${K%%%%.*}; echo ID_DVB_DEVICE=$${K#*.}'"

IMPORT{program}="path_id %p"

#Here set ID_DVB_ADAPTER to be persistent # example:
ENV{ID_PATH}=="pci-0000:01:08.0", ENV{ID_DVB_ADAPTER}="3"
ENV{ID_PATH}=="pci-0000:01:06.0", ENV{ID_DVB_ADAPTER}="2"

# fallback-number
ENV{ID_DVB_ADAPTER_KERNEL}=="?*", ENV{ID_DVB_ADAPTER}!="?*",
ENV{ID_DVB_ADAPTER}="$env{ID_DVB_ADAPTER_KERNEL}"

# Create device
ENV{ID_DVB_ADAPTER}=="?*", ENV{ID_DVB_DEVICE}=="?*",
NAME="dvb/adapter$env{ID_DVB_ADAPTER}/$env{ID_DVB_DEVICE}"

LABEL="dvb_end"
############################# 50-udev.rules END ############################

I have updated the final section of /sbin/path_id from - 

############################# path_id ############################ case
"$TYPE" in
        block)
        handle_block
        ;;
        *)
        RESULT=1
        ;;
esac
############################# path_id END ############################

To the following, as the diff file Matthias sent me simply didn't work
(which I am sure is a case of Fedora just being different to gentoo which I
guess he is using) - ############################# path_id
############################ case "$TYPE" in
        block)
        handle_block
        ;;
        dvb)
        handle_device
        echo "ID_PATH=$d"
        ;;
        *)
        RESULT=1
        ;;
esac
############################# path_id END ############################

Unfortunately the dvb adaptors still load as 0 and 1 as opposed to 2 and 3
as expected.
I have now tried this on Fedora 7 (as opposed to core 6 as I was
historically) and still get the same response.
HELP!


_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux