From owner-freebsd-new-bus@FreeBSD.ORG Thu Mar 18 06:26:36 2004 Return-Path: Delivered-To: freebsd-new-bus@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E402716A4DA; Thu, 18 Mar 2004 06:26:36 -0800 (PST) Received: from gvr.gvr.org (gvr-gw.gvr.org [80.126.103.228]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68A5C43D48; Thu, 18 Mar 2004 06:26:36 -0800 (PST) (envelope-from guido@gvr.org) Received: by gvr.gvr.org (Postfix, from userid 657) id 61B632D; Thu, 18 Mar 2004 15:26:37 +0100 (CET) Date: Thu, 18 Mar 2004 15:26:37 +0100 From: Guido van Rooij To: "M. Warner Losh" Message-ID: <20040318142637.GA92351@gvr.gvr.org> References: <200403180913.33873.dfr@nlsystems.com> <20040318100553.GA88901@gvr.gvr.org> <200403181012.43455.dfr@nlsystems.com> <20040318.221110.109506333.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040318.221110.109506333.imp@bsdimp.com> cc: freebsd-new-bus@freebsd.org cc: new-bus@freebsd.org Subject: Re: ppbus probe problem X-BeenThere: freebsd-new-bus@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD's new-bus architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2004 14:26:37 -0000 On Thu, Mar 18, 2004 at 10:11:10PM +0800, M. Warner Losh wrote: > : > On Thu, Mar 18, 2004 at 09:13:33AM +0000, Doug Rabson wrote: > : > > I would use something like: > : > > > : > > static void > : > > vpo_identify(driver_t *driver, device_t parent) > : > > { > : > > device_t dev; > : > > > : > > dev = device_find_child(parent, "vpo", 0); > : > > if (!dev) > : > > BUS_ADD_CHILD(parent, 0, "vpo", -1); > : > > } > : > > : > So I'll update all of the ppbus drivers that way. Okay? > : > : I think so. Warner, do you have any objections? > > No. > > : In an ideal world, there should be some kind of BUS_UNIDENTIFY method > : which a driver could use to delete the devices it created in > : BUS_IDENTIFY. > > Or the bus would have a driver deleted routine that got called and it > would remove all instances of the devclass attached to it. Ok, I'll commit the changes Doug suggested. Warner: I have a working tw driver. Would you care looking at it? It is ppbus based. -Guido