From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 28 19:57:02 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D1E1316A422 for ; Mon, 28 Nov 2005 19:57:02 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17B1543D4C for ; Mon, 28 Nov 2005 19:56:59 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.3/8.13.3) with ESMTP id jASJuu2n015445; Mon, 28 Nov 2005 11:56:56 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.3/8.13.3/Submit) id jASJuuXq015444; Mon, 28 Nov 2005 11:56:56 -0800 (PST) (envelope-from jmg) Date: Mon, 28 Nov 2005 11:56:56 -0800 From: John-Mark Gurney To: kylin Message-ID: <20051128195656.GK885@funkthat.com> Mail-Followup-To: kylin , "freebsd-hackers@freebsd.org" References: <87ab37ab0511261855lfc5d062h7d394f25bcd00ec0@mail.gmail.com> <20051127.164001.61158282.imp@bsdimp.com> <87ab37ab0511272036t60b22769sff7a201d4d3cf8f9@mail.gmail.com> <868xv8by8x.fsf@xps.des.no> <87ab37ab0511280804q30c84a51te515facc30e81ff4@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ab37ab0511280804q30c84a51te515facc30e81ff4@mail.gmail.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: "freebsd-hackers@freebsd.org" Subject: Re: to list all the devices in freebsd &definition analyse X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2005 19:57:03 -0000 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."