Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 May 2006 23:20:02 -0600 (MDT)
From:      Warner Losh <imp@bsdimp.com>
To:        avalonwallace@gmail.com
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: misc questions about the device&driver arch
Message-ID:  <20060519.232002.71106210.imp@bsdimp.com>
In-Reply-To: <87ab37ab0605192015h363ef74aw23dcc2d97721dea9@mail.gmail.com>
References:  <87ab37ab0511032030o134b9316j83295dd303e4e44b@mail.gmail.com> <87ab37ab0605192015h363ef74aw23dcc2d97721dea9@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> about  devclass_find_internal
> devclass_find_internal will  be called to create a new devclass in
> such 2 conditions :
> one is creating a new device , as : if (name) {  dc =
> devclass_find_internal(name, 0, TRUE);
> another is  in the function:devclass_add_driver. but ,if a driver 's
> name is different from the name of any deviceclass  in the system ,it
> just create a new devclass ,and link it self into the parent
> busdevice's driver link  and do nothing .what is the use of the driver
> at this situation?

Busses create devices to represent hardware in the system.  The bus
then causes these devices to be probed and attached.  This latter
usage is for those cases.  As drivers are loaded these devices are
offered to the new (and old) drivers in the system.

FreeBSD inherently dynamic in its device system.  The hardest part of
adding hotplug support is programming the bridge.  Adding new devices
to the tree is easy, but knowing when to add them is hard since you
have to write a bridge driver...

Warner



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