Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Nov 2005 11:56:56 -0800
From:      John-Mark Gurney <gurney_j@resnet.uoregon.edu>
To:        kylin <fierykylin@gmail.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: to list all the devices in freebsd &definition analyse
Message-ID:  <20051128195656.GK885@funkthat.com>
In-Reply-To: <87ab37ab0511280804q30c84a51te515facc30e81ff4@mail.gmail.com>
References:  <87ab37ab0511261855lfc5d062h7d394f25bcd00ec0@mail.gmail.com> <20051127.164001.61158282.imp@bsdimp.com> <87ab37ab0511272036t60b22769sff7a201d4d3cf8f9@mail.gmail.com> <868xv8by8x.fsf@xps.des.no> <87ab37ab0511280804q30c84a51te515facc30e81ff4@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051128195656.GK885>