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 
> 
> +static int adapter_nr[] = {[0 ... (DVB_MAX_ADAPTERS - 1)] = DVB_UNSET };
> +module_param_array(adapter_nr, int, NULL, 0444);
> +MODULE_PARM_DESC(adapter_nr,"DVB adapter numbers");
> 
> and modifies the dvb_register_adapter call. Full patch is attached as
> compressed file.
> 
> With the exception of dvb-usb I have just added the paramter to the module
> with the dvb_register_adapter() call. budget-core and videobuf-dvb are
> affected for example. I'll push the option to the driver which uses these
> modules after we reached consent on the approach.
> 
> Janne 

I like this a lot -- In fact, I think I love it.  I don't have anything negative
to say about this at all.  I've always wanted a module option for this.  True,
it can be done with udev, but that's no reason not to move forward.

I say Janne should continue on and convert the rest of the drivers... Is anybody
opposed?

Cheers,

Mike

-- 
Michael Krufky


_______________________________________________
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