Date: Tue, 22 Nov 2005 00:07:10 +0800 From: kylin <fierykylin@gmail.com> To: freebsd-hackers@freebsd.org Subject: sysinit how does nexus find legacy's driver? Message-ID: <87ab37ab0511210807p64282a42i657aeca9ef481e3d@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
The nexus_attach(device_t dev) will call
int
bus_generic_probe(device_t dev)
{
=09devclass_t dc =3D dev->devclass;
=09driverlink_t dl;
=09TAILQ_FOREACH(dl, &dc->drivers, link) {//here configure has point out
the relation?
=09=09DEVICE_IDENTIFY(dl->driver, dev);//here refer to the son's
IDENTIFY,make son's device structure
=09}
=09return (0);
}
the question is
in TAILQ_FOREACH(dl, &dc->drivers, link)
how does nexus get legacy's driver in its devclass ?
have it done in the SI_SUB_DRIVER part?of initialization?
What happen during sSI_SUB_DRIVER ,does devclass for each driver initialize=
d?
May be the before SI_SUB_CONFIGURE, SI_SUB_DRIVER will first be
implement ,and the relative drivers will connect to each other.
I am sure that in autoconf.c ,the dl->link does not be add in ,so
where does the nexus find legacy?
In devclass_find_inernal
=09TAILQ_FOREACH(dc, &devclasses, link) {
=09=09if (!strcmp(dc->name, classname))
=09=09=09break;
=09}found nothing ,
//////////////////
--
we who r about to die,salute u!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87ab37ab0511210807p64282a42i657aeca9ef481e3d>
