From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 6 04:00:29 2003 Return-Path: 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 0E1CA37B401 for ; Wed, 6 Aug 2003 04:00:29 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id B15A343F93 for ; Wed, 6 Aug 2003 04:00:27 -0700 (PDT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) by srv1.cosmo-project.de (8.12.9/8.12.9) with ESMTP id h76B0HaK090005 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 6 Aug 2003 13:00:23 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.9/8.12.9) with ESMTP id h76B0EAx043415 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 6 Aug 2003 13:00:15 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.9/8.12.9) with ESMTP id h76B0ENS035203; Wed, 6 Aug 2003 13:00:14 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.9/8.12.9/Submit) id h76B0DTH035202; Wed, 6 Aug 2003 13:00:13 +0200 (CEST) Date: Wed, 6 Aug 2003 13:00:13 +0200 From: Bernd Walter To: Poul-Henning Kamp Message-ID: <20030806110013.GE32228@cicely12.cicely.de> References: <20030806104001.GD32228@cicely12.cicely.de> <40470.1060166743@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40470.1060166743@critter.freebsd.dk> X-Operating-System: FreeBSD cicely12.cicely.de 5.1-CURRENT alpha User-Agent: Mutt/1.5.4i cc: freebsd-hackers@freebsd.org cc: ticso@cicely.de Subject: Re: How to get a device_t X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Aug 2003 11:00:29 -0000 On Wed, Aug 06, 2003 at 12:45:43PM +0200, Poul-Henning Kamp wrote: > In message <20030806104001.GD32228@cicely12.cicely.de>, Bernd Walter writes: > >On Wed, Aug 06, 2003 at 12:18:28PM +0200, Poul-Henning Kamp wrote: > >> In message <20030806101148.GC32228@cicely12.cicely.de>, Bernd Walter writes: > >> >>From the logicaly standpoint the extensions had to be attached to > >> >nexus, but nowhere is the current code path there is a handle for > >> >nexus or any other device_t. > >> > >> In fact what you may want to do is hang the entire MMCR off the nexus > >> as a bus, and hang the various drivers off that bus. > > > >What needs to be in *_probe() to conditionalize on elan existence? > > Well, my idea was to hang the mmcr bus on nexus when we find out it > is an elan. Back to the original question: How do I get the device_t from nexus? Is there a get_nexus() function somewhere? > It may be that you are not allowed to attach a bus to the nexus when > we find out it is an elan in the host/pci bridge probe, but then I guess > you could just hang it off that instead. There is also no other device_t in the code path available. The last function knowing a device_t is nexus_pcib_identify. We then have to pass this as an argument to nexus_pcib_is_host_bridge(). > Pressumably some newbus magic will then probe that bus. If its not > an elan, there is no mmcr bus and nothing will get probed. Yes - that part is clear. -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de