We have non-source code drivers in which there is a single file containing LiS-isms that gets compiled at driver installation time. This is the file that contains the module init/cleanup routines and which makes the /dev nodes.
-- Dave
At 05:48 PM 6/23/2004, dan_gora wrote:
--- Dave Grothe <[EMAIL PROTECTED]> wrote:
> If you write a loadable STREAMS module you can call the streams driver
> registration routine and get a major assigned dynamically. You can then
> use this number in conjunction with lis_mknod() to make your own /dev nodes
> from within the init routine of your driver. You can unregister and remove
> the nodes in your module unload routine.
How do I get the major of the clone driver though? I need to create a clone
device, so now I just give it (at least until the clone device got changed to
231):
'mknod c 220 <adax driver major number>' in the install script.
It seems to do the lis_mknod() in the init routine I still need the major
number of the clone driver, or am I missing something?
If I still need the clone major, if there's an easy way to get it, maybe I
can whip up a "lis_create_minor_node()" which would work like the Solaris
version (ddi_create_minor_node()) so that you can just pass a flag
(CLONE_DEV) on Solaris to get your node created.
thanks-
dan
> The LiS loopback driver is now such a module and can serve as an example.
>
> -- Dave
>
> At 04:06 PM 6/23/2004, Gurol Akman wrote:
> >I always thought the following 2 low-cost features would make LiS very
> >flexible across multiple HW platforms:
> >
> >1. support for dynamic major number assignment;
> >
> >2. automatic creation/removal of special device nodes within device
> >init/cleanup routines;
> >
> >If there is sufficient interest among the LiS community, I can work on
> >patches for both. If many of you view this as a low-priority item as Dave
> >does, then pls ignore this request. Regards -- GA
> >-----Original Message-----
> >From: Dave Grothe [mailto:[EMAIL PROTECTED]]
> >Sent: Wednesday, June 23, 2004 4:56 PM
> >To: Gurol Akman; [EMAIL PROTECTED]; linuxstreams
> >Subject: RE: [Linux-streams] LiS 2.17.P Clone driver major number change.
> >
> >That goes into the "this would be nice to do sometime when I have
> >unlimited free time" stack.
> >-- Dave
> >
> >At 03:46 PM 6/23/2004, Gurol Akman wrote:
> >>Is there a technical reason for using hard-coded major numbers in LiS
> >>drivers? Wouldn't it be more convenient if all LiS drivers supported
> >>dynamic major number assignment (i.e., based on use of reserved major
> >>number 0)? This would satisfy the needs of all, I'd think. Regards -- GA
> >>-----Original Message-----
> >>From: Dave Grothe [mailto:[EMAIL PROTECTED]]
> >>Sent: Wednesday, June 23, 2004 4:40 PM
> >>To: [EMAIL PROTECTED]; linuxstreams
> >>Subject: Re: [Linux-streams] LiS 2.17.P Clone driver major number change.
> >>It was merely an attempt to avoid collisions with kernel major device
> >>numbers. Is this causing people pain? I could change the default back
> >>to 220.
> >>-- Dave
> >>At 03:19 PM 6/23/2004, dan_gora wrote:
> >>
> >>
> >>>Hi Dave...
> >>>I noticed that the major number of /dev/clone/drvr has been changed in
> >>>2.17.P
> >>>from 220 to 231. What was the reason for that change? Linux 2.6?
> >>>
> >>>BTW... LiS 2.17.P looks great. It is already helping the performance of
> at
> >>>least one of our drivers (the one that I just tried). I'm getting 5-10%
> >>>better throughput and 5-10% less CPU utilization without doing anything
> >>>to my
> >>>driver!
> >>>Keep up the good work...
> >>>thanks-
> >>>dan
> >>>
> >>>_______________________________________________
> >>>Linux-streams mailing list
> >>>[EMAIL PROTECTED]
> >>>http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams
>
_______________________________________________
Linux-streams mailing list
[EMAIL PROTECTED]
http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams
