Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Feb 2004 11:26:31 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        des@des.no
Cc:        arch@freebsd.org
Subject:   Re: per-device sysctls
Message-ID:  <20040226.112631.45877306.imp@bsdimp.com>
In-Reply-To: <xzpk729lnq7.fsf@dwp.des.no>
References:  <xzpk729lnq7.fsf@dwp.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <xzpk729lnq7.fsf@dwp.des.no>
            des@des.no (Dag-Erling Sm=F8rgrav) writes:
: I also plan to add entries for device IDs, irq /
: drq lines etc., but this will require additional bus-specific code an=
d
: 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040226.112631.45877306.imp>