Re: bus_generic_probe() is wrong I think
John Baldwin <[email protected]> Fri, 30 Aug 2002 22:59:52 -0400 (EDT)
| Newsgroups | gmane.os.freebsd.devel.new-bus |
|---|---|
| Message-ID | <[email protected]> |
On 31-Aug-2002 M. Warner Losh wrote: > In message: <[email protected]> > John Baldwin <[email protected]> writes: >: If we are going to support having multiple driver's for a given device >: which is a bus (like we do now for PCI busses and like I am doing for >: this concept of a system buson i386) then I think that bus devices do >: not need to go identify child devices until after they have won the >: probe and are being attached. Thus, I'm ending up calling >: bus_generic_probe() in my attach routines instead of my probe routines. >: Does this make sense or am I missing something? I at least have to do >: this in the system bus case here for the same reasons that when I added >: another PCI bus driver, I had to change the PCI drivers to add children >: devices (equivalent of doing an identify) during attach() time and not >: during probe() time. > > A more fundamental question is why bus_generic_probe() does the child > attach/probe? In the probe routine, there's no guarantee that the > bus will actually attach at some later point. Shouldn't that be in a > bus_generic_attach() routine? The probe should just say 'is this bus > here' and the attach should make it possible to then probe the > children after a successful attach. Pretty much what I was saying. I have an atsys(4) driver btw that apm and nexus_pcib are now descendants of and only gets attached if the acpi identify fails in the jhb_acpipci p4 branch. -- John Baldwin <[email protected]> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to [email protected] with "unsubscribe freebsd-new-bus" in the body of the message