On Fri, 2007-08-17 at 20:39 -0400, Andrew Gallatin wrote: > Hi, > > I have a GLDv2 ethernet driver which I need to add some > OS-bypass functionality to. I'm porting this from Linux, > where the linux ethernet driver creates a character device > for mmap/ioctl access to this functionality. > > I'm somewhat concerned, as it looks like GLD (or something) creates a > /dev/drivername character device. Does GLD (or whatever) us *my* > cb_ops struct for this, or its own? Am I allowed to make the cb_open, > cb_close, cb_devmap and cb_ioctl pointers in my driver's cb_ops > structure non-null, and use them (in conjunction with > ddi_create_minor_node()) for this new functionality? > > If not, how can I get a device node for mmap/ioctl access?
The classic way of doing this is to create a second driver, which depends on the code from the first (link with -N drv/mydriver or somesuch), but exports its own cb_ops. As far as I can tell, you really can't export multiple cb_ops routines, and in particular, a driver cannot be both a streams driver *and* a character or block driver. Other approaches might include using the ioctl entry point (though this won't help with mmap!) -- Garrett > > Thanks, > > Drew > > _______________________________________________ > driver-discuss mailing list > driver-discuss@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/driver-discuss _______________________________________________ driver-discuss mailing list driver-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/driver-discuss