per-device sysctls
M. Warner Losh
imp at bsdimp.com
Thu Feb 26 10:27:12 PST 2004
In message: <xzpk729lnq7.fsf at dwp.des.no>
des at des.no (Dag-Erling Smørgrav) writes:
: I also plan to add entries for device IDs, irq /
: drq lines etc., but this will require additional bus-specific code and
: is not yet implemented.
You don't need bus specific code for any of these things, per se.
There's already two routines that busses can (and mostly do)
implement. The irq/drq/resource stuff is already recorded elsewhere
and can be dug out, just like devinfo does. The existing interface to
get location and pnpinfo from the bus are:
#
# Returns the pnp info for this device. Return it as a string. If the
# string is insufficient for the storage, then return EOVERFLOW.
#
METHOD int child_pnpinfo_str {
device_t _dev;
device_t _child;
char *_buf;
size_t _buflen;
};
#
# Returns the location for this device. Return it as a string. If the
# string is insufficient for the storage, then return EOVERFLOW.
#
METHOD int child_location_str {
device_t _dev;
device_t _child;
char *_buf;
size_t _buflen;
};
Warner
More information about the freebsd-arch
mailing list