Re: Issue with limitation of 256 minors per major in LiS 2.16 on Linu x 2.4
Steve Schefter <[email protected]>
| Newsgroups | gmane.linux.kernel.streams |
|---|---|
| Organization | The Software Group Limited |
| Message-ID | <[email protected]> |
Hi Eashwaran.
> I can do that in my driver and have an array of 4 major numbers each
> capable of 256 minor numbers. My question is: when I return from
> device_open routine, if I change the major number of the device to
> another major number (allocated for the same driver) will it work?
We do exactly this for the same reasons and yes it works.
*devp = makedevice(pktmajors[slot >> MINORBITS], (slot & MINORMASK));
return (0);
> Even if the above strategy is alright, do you think it will still work
> even if my driver uses locks. Currently I use 2 lis_rw_lock_t and 1
> lis_spin_lock_t structures to safeguard common data and critical sections.
We also do this. I can't think of a sane locking strategy that would be
affected by having multiple majors.
Regards,
Steve
------------------------------------------------------------------------
Steve Schefter phone: +1 705 725 9999 x26
The Software Group Limited fax: +1 705 725 9666
642 Welham Road, email: [email protected]
Barrie, Ontario CANADA L4N 9A1 Web: www.wanware.com