cvs commit: src/sys/dev/fxp if_fxp.c if_fxpvar.h

Dag-Erling Smørgrav des at des.no
Thu Jun 3 14:09:56 PDT 2004


"M. Warner Losh" <imp at bsdimp.com> writes:
> des at des.no (Dag-Erling Smørgrav) writes:
> : "M. Warner Losh" <imp at bsdimp.com> writes:
> : > How about an API?  How does the driver deal with the global/instance
> : > variable split?  If I set dev.fxp.gerbil to 1 and dev.fxp.1.gerbil to
> : > 23?  Is that order dependent?
> : that's up to the driver author to decide.
> That's why I want to know the API the driver will use so that it can
> be judged as sufficient or not.  I also think we should have some kind
> of default design pattern.

The API will be {devclass,device}_get_sysctl_{ctx,tree}().  The driver
then adds children to these nodes using sysctl_add_*().

> : you can't have the driver be the parent, because some devices have no
> : driver (but they all have a class), and I want to use dev.fxp.fxp0
> : instead of dev.fxp.0 on the off chance that there might be multiple
> : devices in a class with the same unit number but different names.
> That can't happen.  If it does, I want other things to break as well
> so we notice when it does.  I'd rather see symetry with the hints
> mechanism.

OK, I'll do dev.fxp.0.foo then.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the cvs-src mailing list