Re: [RFC PATCH] Choose dvb adapter number with a driver specific module option

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

 



Janne Grunau wrote:
> Hi,
> 
> Dynamic loading of modules by udev on startup (aka coldplugging) doesn't
> result in deterministic dvb adapter numbers.
> 
> V4L drivers have the {radio|vbi|video}_nr module options to allocate
> static minor numbers per driver.
> Attached patch adds a similiar mechanism to the dvb subsystem. To avoid
> problems with device unplugging and repluging each driver holds
> a DVB_MAX_ADAPTER long array of the preffered order of adapter numbers.
> options dvb-usb-dib0700 adapter_nr=7,6,5,4,3,2,1,0 would result in a
> reversed allocation of adapter numbers.
> With adapter_nr=2,5 it tries first to get adapter number 2 and 5. If both
> are already in use it will allocate the lowest free adapter number.
> 
> Besides following changes in dvb-core and dvb-usb core the patch adds to
> all drivers 
> ...

While I don't care much whether there is an option for this in the
driver, I'd like to point out that this is the wrong approach (imho).

Citing Greg Kroah-Hartman (udev-113/docs/udev_vs_devfs):
|    ...
|    2) udev does not care about the major/minor number schemes.  If the
|       kernel tomorrow switches to randomly assign major and minor numbers
|       to different devices, it would work just fine (this is exactly
|       what I am proposing to do in 2.7...)
|    3) This is the main reason udev is around.  It provides the ability
|       to name devices in a persistent manner.  More on that below.
|    ...

According to this, adding such an option is a step into the wrong
direction. The right way is to fix the udev scripts...

CU
Oliver

-- 
----------------------------------------------------------------
VDR Remote Plugin 0.3.9: http://www.escape-edv.de/endriss/vdr/
----------------------------------------------------------------


_______________________________________________
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