public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Order of dvb devices
@ 2010-01-16  8:36 Dan Taylor
  0 siblings, 0 replies; 14+ messages in thread
From: Dan Taylor @ 2010-01-16  8:36 UTC (permalink / raw)
  To: linux-media


Mika Laitio wrote:
>> True, the ordering is not exactly the same everytime. One will need to
>> provide PCI Bus related info also to a practical udev configuration to
>> get things sorted out in a sane way, rather than anything else.
>
> At least in Mandriva, the order and naming of network adapters are handled by using a this kind of udev rule which prevents for example eth0 and eth1 to swap between boots:
>
> [lamikr@iiris rules.d]$ cat 70-persistent-net.rules
> # This file was automatically generated by the /lib/udev/write_net_rules
> # program, run by the persistent-net-generator.rules rules file.
> #
> # You can modify it, as long as you keep each rule on a single
> # line, and change only the value of the NAME= key.
>
> # Drakx-net rule for eth0 (00:24:e8:9e:66:13)
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:11:22:33:44:55", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0
>
> # PCI device 0x8086:0x4232 (iwlagn)
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="11:22:33:44:55:66", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0""
>
> I am not sure whether udev rules itself can originally generate this file or whether it's mandriva's own tools/scripts that will generate this file and add all new adapters it finds that are not yet in the file.
>
> Mika


The eth drivers have one advantage:  nearly all of them have an
associated MAC address, which is (supposed to be, anyway) globally
(the planet, not just the system) unique.  It is, therefore, easy
enough to associate a specific NIC with a specific name, as shown.

If we keep some sort of configuration table:

For those boards that have eeproms, and for which the eeprom contains
a serial number, or other unique identifier, we could do the same thing.

Alternatively, we could use the PCI address (bus/device/unit).

USB devices can have serial numbers, but it isn't common.

Sounds like we need to think about keeping a table, having some udev
rules to work with it, and some utility to manage it.

RFQ time?

> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Order of dvb devices
@ 2010-01-14 15:35 Andreas Besse
  2010-01-14 15:46 ` Devin Heitmueller
  0 siblings, 1 reply; 14+ messages in thread
From: Andreas Besse @ 2010-01-14 15:35 UTC (permalink / raw)
  To: linux-media

if a system contains multiple DVB cards of the same type, how is the
order of devices determined by the driver/kernel?

I use 2 Technotrend S2-3200 cards in a system and observerd that if I
load the driver driver budget_ci manually as follows:

modprobe budget_ci adapter_nr=0,1

the device with the lower pci ID 0000:08:00.0 is assigned to adapter0 and the device with the higher pci ID 0000:08:01.0
is assigned to adapter1:


udevinfo -a -p $(udevinfo -q path -n /dev/dvb/adapter0/frontend0)
[...]
  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:08:00.0':
    KERNELS=="0000:08:00.0"
    SUBSYSTEMS=="pci"


udevinfo -a -p $(udevinfo -q path -n /dev/dvb/adapter1/frontend0)
[...]
  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:08:01.0':
    KERNELS=="0000:08:01.0"
    SUBSYSTEMS=="pci"


Is it true for all DVB drives that the device with the lower PCI id gets the lower adapter name?









^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-01-18 13:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-16  8:36 Order of dvb devices Dan Taylor
  -- strict thread matches above, loose matches on Subject: below --
2010-01-14 15:35 Andreas Besse
2010-01-14 15:46 ` Devin Heitmueller
2010-01-14 16:01   ` Andreas Besse
2010-01-14 16:09     ` Devin Heitmueller
2010-01-14 17:19       ` Michael Krufky
2010-01-15 23:00       ` Oliver Endriss
2010-01-15 23:05         ` Devin Heitmueller
2010-01-15 23:08         ` Manu Abraham
2010-01-16  6:50           ` Mika Laitio
2010-01-18  8:58           ` Andreas Besse
2010-01-18 10:32             ` Manu Abraham
2010-01-18 13:16               ` Andreas Besse
2010-01-15 23:12         ` hermann pitton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox