Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: More than 4 DVB cards - again
Michael Hunold wrote:
> On 06/22/04 10:27, Peter Maersk-Moller wrote:
> >Seriously, using "extended minor number". How do I do that ?
> >Are you talking about changing something in a config file
> >or are you talking about rewriting the device driver ?
>
> This must be changed in the dvb-core device handling.
dev_t has now 32 bit (12 bit for the major and 20 bit for the minor
number). See http://lwn.net/Articles/49684/
BTW, I now remember that the CONFIG_DVB_DEVFS_ONLY stuff was
dropped because of changes in devfs. It just wouldn't work
that way anymore in 2.6.
> >What is the limitation regarding more DVB devices than 4 ?
>
> There can be 9 different types of devices per adapter
> (video,audio,sec,frontend,demux,dvr,ca, net) and each device can be
> present up to 4 times (ie. demux0, demux1, demux2, demux3)
>
> Because everything needs to be a power of two, one adapter consumes
> 16*4=64 minor numbers. Because of the fact you only have 256 minor
> numbers you're stuck with 4 adapters.
>
> For 2.4 alone, the devfs implementation wasn't tied to major/minor
> numbers, so if you used devfs alone it was possible to support more that
> 4 adapters.
The "power of two" thing is not a requirement, it's usually
just convenient because you can simply mask the adapter number
or device type from the minor number.
However, if you look at dvbdev.c, dvbdev_find_device() does not
make use of this encoding. Wierd...
In theory:
It would be possible to use 3 bits for the adapter number and
make a table which maps the remaining 5 bits to device type
and number, and adapt MAKEDEV-DVB.sh to the new numbering scheme.
However, as this would create some headaches for many users
during driver upgrade, I don't want to do this. Either use
the new dev_t bits or use a second major number.
> In 2.6 this has changed -- devfs is now more tightly coupled and is
> limited to major/minor numbers again.
>
> But: major/minor numbers have been extended from 8 to 16 bit types, so
It's 12/20 bit, see kdev_t.h.
> it should be possible to support more devices, but this also affects the
> surrounding system (ie. glibc must support this)
Specifically mknod must allow you to create device nodes with major or minor > 255.
Johannes
Home |
Main Index |
Thread Index