sysinit how does nexus find legacy's driver?
kylin
fierykylin at gmail.com
Mon Nov 21 17:04:40 GMT 2005
The nexus_attach(device_t dev) will call
int
bus_generic_probe(device_t dev)
{
devclass_t dc = dev->devclass;
driverlink_t dl;
TAILQ_FOREACH(dl, &dc->drivers, link) {//here configure has point out
the relation?
DEVICE_IDENTIFY(dl->driver, dev);//here refer to the son's
IDENTIFY,make son's device structure
}
return (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 initialized?
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
TAILQ_FOREACH(dc, &devclasses, link) {
if (!strcmp(dc->name, classname))
break;
}found nothing ,
//////////////////
--
we who r about to die,salute u!
More information about the freebsd-hackers
mailing list