Subject: Re: Pluged : USBd for NetBSD ?
To: None <>
From: M. Warner Losh <>
List: tech-kern
Date: 01/22/2005 21:42:48
In message: <>
            "Nathan J. Williams" <> writes:
: Lennart Augustsson <> writes:
: > Something like usbd is doubtlessly needed.  It would be
: > nice if it could be common for all hot pluggable devices.
: The recently-introduced /dev/drvctl seems to be a good place to
: communicate driver attach/detach messages from the kernel to
: userland. We have attach and detach sufficently centralized that it
: shouldn't be hard to cause a message to be generated for a listener
: there.

For FreeBSD, I was able to add about 200 lines of code to the kernel
to newbus' centeralized location for each device's attach, detach and
failure to probe.  I then wrote devd to cope with the events from the
kernel.  At first, I tried to allow devd to 'vote' on what to do for
unknown devices, but abadoned that idea in favor of having it just
load a new kernel driver, which would then claim the device.

NetBSD's centralized attach/detach stuff should prove sufficient.