How do I pass configuration parameters to a FreeBSD Device Driver ?

Marc Loerner marc.loerner at hob.de
Thu Jun 4 06:58:03 UTC 2009


Am Donnerstag 04 Juni 2009 04:27:25 schrieb David Somayajulu:
> Larry Maloney wrote:
> > David Somayajulu wrote:
> > > Hi All,
> > > I would appreciate if you could let me know, how I can pass
> >
> > configuration parameters to a device driver, which can be processed
> > during either probe() or attach() ? Is there a way to read them from a
> > conf file of some sort ? Basically, I am interested in setting some
> > tunable parameters during driver initialization, without needing to
> > recompile the driver every time.
> >
> > > thanks
> > > david Somayajulu
> > >
> > > _______________________________________________
> > > freebsd-drivers at freebsd.org mailing list
> > > http://lists.freebsd.org/mailman/listinfo/freebsd-drivers
> > > To unsubscribe, send any mail to "freebsd-drivers-
> >
> > unsubscribe at freebsd.org"
> >
> >
> > Isn't that what the hints file is for?
>
> Sorry, I am sort of new to FreeBSD. From what I understand
> /boot/device.hints gets read during boot time, the values cannot be changed
> by the user while the kernel is running - am I correct ?
>
> I have a loadable driver module and would like to do the following:
> 1. Set some tunable parameters of the driver.
> 2. Load the driver. Run a few tests.
> 3. Unload the driver.
> 4. repeat steps 1 thru 3.
>

I think exactly what you search is sysctls. There you have tunables to change 
at runtime

Regards,
Marc

> > Larry
> >
> > --
> > ==============================
> > Larry P. Maloney
> > CEO/CTO SoftNet Solutions
> >
> > Phone: 650-961-2315
> >   Web: www.softnetsolution.com
>
> _______________________________________________
> freebsd-drivers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-drivers
> To unsubscribe, send any mail to "freebsd-drivers-unsubscribe at freebsd.org"



More information about the freebsd-drivers mailing list