Subject: Re: Renovating autoconf(9)
To: Michael Lorenz <>
From: Quentin Garnier <>
List: tech-kern
Date: 12/10/2007 21:33:08
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Dec 10, 2007 at 03:08:14PM -0500, Michael Lorenz wrote:
> I'm not sure if this can be done in a sane and easy way but who knows.
> Sometimes it would be useful for a device to have more than one =20
> parent, like some Apple audio chips which attach to obio for DMA, =20
> gpio etc. and a mixer part that attaches to an i2c bus. Right now the =20
> DMA part attaches and defers further configuration, then digs though =20
> the device list looking for its long lost cousin, errm - mixer, which =20
> is kind of ugly.

The problem with your example is that there is information about the
identity (in the sense that they're the same) of the two devices is
only known through God's advice (i.e., reading the docs about the

A better example of multi-parenting would be a SCSI device seen through
two different HBAs.  In this case there is a way to tell the device is
the same because it carries the same identification.  We could thus
imagine adding a parameter to ac_alloc_child() e.g., hwident (which
would only make sense for a given device class) which would help
retrieve the existing device_t.

If in your issue you have such a gateway between the two sides of the
audio device, then it's possible.  Of course there are a few other
things to change in the API...

Also, I've been thinking about adding the possibility to have multiple
drivers attaching to a device, a main driver, and several feature-
specific ones.  One situation where it is an issue is the PCI-to-ISA
bridges on x86:  if I create an acpipcib(4), then we lose the ability
to attach ichlpcib(4).  It would be better to keep the existing pcib(4)
and let ichlpcib and apcipcib be persona of the pcib(4) device.

Quentin Garnier - -
"See the look on my face from staying too long in one place
[...] every time the morning breaks I know I'm closer to falling"
KT Tunstall, Saving My Face, Drastic Fantastic, 2007.

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.4.6 (NetBSD)