hey ashwani,

sounds like you figured it out, but unless you want to confuse people,
please don't say your creating multiple device instances.  you still
only have one device instance.  the approach you've chosen involves
creating multiple minor nodes.

ed

On Tue, Mar 09, 2010 at 05:06:09PM +0530, Ashwani Raina wrote:
> Hi Ed,
>
> I have already started working on first approach - creating device instances
> dynamically, sort of similar to what lofi does.
> Thanks for the response.
>
> Regards,
> Ashwani
>
> On Tue, Mar 9, 2010 at 5:54 AM, Edward Pilatowicz <edward.pilatow...@sun.com
> > wrote:
>
> > hey ar,
> >
> > most pseudo devices only have one instance.  a device instance may have
> > a large number of minor nodes.  if you simply want multiple minor nodes
> > for your one pseudo device instance, then call ddi_create_minor_node()
> > with different minor node values and you'll get multiple minor nodes.
> > this is what lofi, and most other pseudo devices, does.
> >
> > if you actually need multiple instances (say because you're using cmlb)
> > then you can create those via a conf file or you can instantiate them
> > under a custom pseudo nexus driver.  the latter approach is more
> > flexible but relies on private interfaces in libdevice.so. for an
> > example of a pseudo driver with multiple instances you can look at
> > zcons(7d), which is the zones console driver. there is one instance of
> > zcons instantiated per-zone on the system.  the zcons device instances
> > are created and destroyed by zoneadmd, which is a userland daemon.  see
> > the calls to devctl_*() in usr/src/cmd/zoneadmd/zcons.c
> >
> > good luck,
> > ed
> >
> > On Mon, Mar 08, 2010 at 01:03:14PM +0530, Ashwani Raina wrote:
> > > Hi folks,
> > >
> > > I am currently using LDI interfaces to create pseudo devices over a block
> > > device.
> > > For the same, I have one driver file and one configuration file.
> > >
> > > Now, I need to support more than one block devices at a time.
> > > By that I mean to say, I should be able to create multiple pseudo devices
> > on
> > > multiple target devices mentioned in .conf file.
> > > Not sure how to do that. Adding extra entry in .conf file is not working.
> > > May I am doing something wrong.
> > >
> > > Here is my .conf file content:
> > > ====
> > > name="lyr" parent="pseudo" instance=1;
> > > lyr_targ="/dev/dsk/c7d1s2";
> > > ====
> > >
> > > Cheers,
> > > ar
> >
> > > _______________________________________________
> > > driver-discuss mailing list
> > > driver-discuss@opensolaris.org
> > > http://mail.opensolaris.org/mailman/listinfo/driver-discuss
> >
> >
>
>
> --
> ----
> ar
>
> ------
> "Long you live and high you fly
> And smiles you'll give and tears you'll cry
> And all you touch and all you see
> Is all your life will ever be."
_______________________________________________
driver-discuss mailing list
driver-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to