to list all the devices in freebsd &definition analyse

John-Mark Gurney gurney_j at
Mon Nov 28 19:57:03 GMT 2005

kylin wrote this message on Tue, Nov 29, 2005 at 00:04 +0800:
> > > > devclass is the information about all instances of the device.
> > > > device_t is an instance of the device.  The only difference between a
> > > > bus and a device is that a bus has children.
> > > but pcib and cbb still have pci or cardbus as there children ,and pcib
> > > and cbb is bridge rather than bus :(
> > > i am puzzle with the definition:(
> >
> > as far as the kernel is concerned, any devices that other devices
> > attach to is a bus.
> no .device_get_parent  of a pci bus we get pcib
> > > we who r about to die,salute u!

so??  In FreeBSD land, a device_t is a bus if it has one or more
children..  To put it more simply, all busses are devices...

As for your example of device_get_parent.. you don't realize that the
pci bus is also a device...

  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."

More information about the freebsd-hackers mailing list