Subject: Re: about autoconf
To: ycchang <ycchang@cirx.org>
From: Quentin Garnier <netbsd@quatriemek.com>
List: tech-kern
Date: 09/08/2003 22:32:02
Le Tue, 9 Sep 2003 03:49:00 +0800
ycchang a ecrit :
[...]
>  My question is what the differences between config_found_sm() and
>  config_search(), although it says 
> that there are two cases when integrating a device on a bus : direct
> configuration and indirect configuration, the former often uses
> config_found_sm() to find child devices, and conversely the later uses
> config_search(). When I traced the code in subr_autoconf.c , I found
> that config_search() is just indirecly called by config_found_sm() and
> it looks likely the same to config_search() .Can anyone  tell me what
> the exact differences between the two functions relative to some common
> buses ,say, PCI or ISA with the following pseudo device tree ?

config_search only searches a matching entry in the autoconf tables for a
given device and related attachment information.

config_found_sm also invokes config_attach, which leads to the call of the
attach function of the device driver, where config_search only uses match.

isa only calls config_search because it has a very special way of
initializing the attachment information for the device.

-- 
Quentin Garnier - cube@cubidou.net
"Feels like I'm fiddling while Rome is burning down.
Should I lay my fiddle down and take a rifle from the ground ?"
Leigh Nash/Sixpence None The Richer, Paralyzed, Divine Discontents, 2002.