linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Razza" <rjames31@btopenworld.com>
To: linux-hotplug@vger.kernel.org
Subject: RE: udev problem DVB-S/T Cards
Date: Wed, 02 May 2007 21:38:42 +0000	[thread overview]
Message-ID: <000901c78d02$417dc140$c47943c0$@com> (raw)
In-Reply-To: <000301c78982$db8615e0$929241a0$@com>

Matthias Schwarzott wrote on 02 May 2007 13:37:
> Some time ago I also tried this. But it will end up like persistent-net
> then.
> You need good criteria to name the devices. Else it will only be chaos.
> And most apps does not work with holes in the numbering as they just
> open
> devices starting from 0, until open fails.
> 
------------------8< SNIP! >8------------------
> 
> But this is untested.

The DVB section of my /etc/udev/rules.d/50-udev.rules is now as follows:

# 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"

So, i'm assuming with the changes the nodes should be /dev/dvb/adapter2/ and
/dev/dvb/adapter3/ ?
Unfortunately they are still being loaded as /dev/dvb/adapter0/ and
/dev/dvb/adapter1/

udevinfo -a -p $(udevinfo -q path -n /dev/dvb/adapter0/frontend0) gives the
following:

login as: root
root@192.168.10.138's password:
Last login: Wed May  2 22:28:32 2007 from 192.168.10.188
[root@MythBE ~]# udevinfo -a -p $(udevinfo -q path -n
/dev/dvb/adapter0/frontend0)

udevinfo starts with the device the node belongs to and then walks up the
device chain, to print for every device found, all possibly useful
attributes
in the udev key format.
Only attributes within one device section may be used together in one rule,
to match the device for which the node will be created.

  looking at device '/class/dvb/dvb0.frontend0':
    KERNEL="dvb0.frontend0"
    SUBSYSTEM="dvb"
    SYSFS{dev}="212:3"

  looking at device '/devices/pci0000:00/0000:00:10.0/0000:01:08.0':
    ID="0000:01:08.0"
    BUS="pci"
    DRIVER="budget dvb"
    SYSFS{msi_bus}=""
    SYSFS{broken_parity_status}="0"
    SYSFS{enable}="1"
    SYSFS{modalias}="pci:v00001131d00007146sv000013C2sd00001005bc04sc80i00"
    SYSFS{local_cpus}="1"
    SYSFS{irq}="21"
    SYSFS{class}="0x048000"
    SYSFS{subsystem_device}="0x1005"
    SYSFS{subsystem_vendor}="0x13c2"
    SYSFS{device}="0x7146"
    SYSFS{vendor}="0x1131"

  looking at device '/devices/pci0000:00/0000:00:10.0':
    ID="0000:00:10.0"
    BUS="pci"
    DRIVER=""
    SYSFS{msi_bus}="1"
    SYSFS{broken_parity_status}="0"
    SYSFS{enable}="1"
    SYSFS{modalias}="pci:v000010DEd0000026Fsv00000000sd00000000bc06sc04i01"
    SYSFS{local_cpus}="1"
    SYSFS{irq}="0"
    SYSFS{class}="0x060401"
    SYSFS{subsystem_device}="0x0000"
    SYSFS{subsystem_vendor}="0x0000"
    SYSFS{device}="0x026f"
    SYSFS{vendor}="0x10de"

  looking at device '/devices/pci0000:00':
    ID="pci0000:00"
    BUS=""
    DRIVER=""

udevinfo -a -p $(udevinfo -q path -n /dev/dvb/adapter1/frontend0) gives the
following:

  looking at device '/class/dvb/dvb1.frontend0':
    KERNEL="dvb1.frontend0"
    SUBSYSTEM="dvb"
    SYSFS{dev}="212:67"

  looking at device '/devices/pci0000:00/0000:00:10.0/0000:01:06.0':
    ID="0000:01:06.0"
    BUS="pci"
    DRIVER="budget_ci dvb"
    SYSFS{msi_bus}=""
    SYSFS{broken_parity_status}="0"
    SYSFS{enable}="1"
    SYSFS{modalias}="pci:v00001131d00007146sv000013C2sd00001017bc04sc80i00"
    SYSFS{local_cpus}="1"
    SYSFS{irq}="20"
    SYSFS{class}="0x048000"
    SYSFS{subsystem_device}="0x1017"
    SYSFS{subsystem_vendor}="0x13c2"
    SYSFS{device}="0x7146"
    SYSFS{vendor}="0x1131"

  looking at device '/devices/pci0000:00/0000:00:10.0':
    ID="0000:00:10.0"
    BUS="pci"
    DRIVER=""
    SYSFS{msi_bus}="1"
    SYSFS{broken_parity_status}="0"
    SYSFS{enable}="1"
    SYSFS{modalias}="pci:v000010DEd0000026Fsv00000000sd00000000bc06sc04i01"
    SYSFS{local_cpus}="1"
    SYSFS{irq}="0"
    SYSFS{class}="0x060401"
    SYSFS{subsystem_device}="0x0000"
    SYSFS{subsystem_vendor}="0x0000"
    SYSFS{device}="0x026f"
    SYSFS{vendor}="0x10de"

  looking at device '/devices/pci0000:00':
    ID="pci0000:00"
    BUS=""
    DRIVER=""

Have I missed something?


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2007-05-02 21:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-28 10:49 udev problem DVB-S/T Cards Razza
2007-05-02  8:47 ` Razza
2007-05-02 11:08 ` Bryan Kadzban
2007-05-02 12:10 ` Razza
2007-05-02 12:36 ` Matthias Schwarzott
2007-05-02 13:31 ` Matthias Schwarzott
2007-05-02 21:38 ` Razza [this message]
2007-05-02 22:20 ` Bryan Kadzban
2007-05-02 23:48 ` Razza
2007-05-03  1:56 ` Bryan Kadzban
2007-05-03  9:10 ` Razza
2007-05-03 11:12 ` Bryan Kadzban
2007-05-03 11:54 ` Razza
2007-05-03 12:13 ` Matthias Schwarzott
2007-05-07 17:18 ` Razza
2007-05-09 17:49 ` Razza
2007-05-30 10:35 ` Razza
2007-07-12  9:05 ` Razza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000901c78d02$417dc140$c47943c0$@com' \
    --to=rjames31@btopenworld.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).