Subject: Re: devd-alike for NetBSD
To: Jason Thorpe <thorpej@shagadelic.org>
From: Jachym Holecek <freza@liberouter.org>
List: tech-kern
Date: 02/09/2005 23:19:25
> >One other question: would it be acceptable for drvctl to be compiled
> >unconditionally? Currently, it is subject to "pseudo-device". I'm not
> >sure how to ellegantly support keeping it optional.
> 
> I don't think it should be optional.
> 
> In any case, even if it is, the infrastructure calls that drivers / 
> busses would make could always be present in subr_autoconf.c

Ok, I'll make it non-optional for now.

> BTW, I think that only busses (i.e. things that attach children) should 
> be sending the notifications.  That way only one place needs to deal 
> with attach, detach, and not-configured type notifications (busses, not 
> busses and drivers).

That's how it is actually implemented -- a few hooks in subr_autoconf.c
to catch generic events, with extended config_{attach, found}_* interface
for busses that care to provide locators+pnp durig attach.

In different thread it has been proposed to also report media information
for devices like cdroms (SCSIPI_PERIPH_MEDIA, if I read scsipi/ well).
If we decide to support this (which I think would be nifty), a hook like

	dvprint_media(dev, present_or_gone); /* called on change */

could be provided to scsipi and "leaf" devices. Other desired event
sources could be supported the same way... After I'm done with rewriting
the config syntax, I planned to look at handling media change.

	Regards,
		-- Jachym Holecek