From owner-freebsd-arch@FreeBSD.ORG Wed May 12 13:30:25 2004 Return-Path: <owner-freebsd-arch@FreeBSD.ORG> Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 75C8316A4CE; Wed, 12 May 2004 13:30:25 -0700 (PDT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0FFB43D4C; Wed, 12 May 2004 13:30:24 -0700 (PDT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id A90B55309; Wed, 12 May 2004 22:30:23 +0200 (CEST) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 87C40530D; Wed, 12 May 2004 22:30:16 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 2602) id 70B5833CAA; Wed, 12 May 2004 22:30:16 +0200 (CEST) To: arch@freebsd.org References: <xzp4qqn6n9v.fsf@dwp.des.no> <20040512010240.GD601@funkthat.com> <xzphdulepy6.fsf@dwp.des.no> <20040512175351.GF601@funkthat.com> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Wed, 12 May 2004 22:30:16 +0200 In-Reply-To: <20040512175351.GF601@funkthat.com> (John-Mark Gurney's message of "Wed, 12 May 2004 10:53:51 -0700") Message-ID: <xzp8yfxcrs7.fsf@dwp.des.no> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on flood.des.no X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL autolearn=no version=2.63 cc: dfr@freebsd.org Subject: Re: newbus flaw X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture <freebsd-arch.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-arch>, <mailto:freebsd-arch-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-arch> List-Post: <mailto:freebsd-arch@freebsd.org> List-Help: <mailto:freebsd-arch-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-arch>, <mailto:freebsd-arch-request@freebsd.org?subject=subscribe> X-List-Received-Date: Wed, 12 May 2004 20:30:25 -0000 John-Mark Gurney <gurney_j@efn.org> writes: > You're always going to be a child of nexus, and since I assume from > the comment that there can only ever be one child. Also, why do you > find_child w/ unit number 0, but then add a child with unit -1? Why > not add it unit 0, and make it fail if that already exists? just didn't think about it. the documentation is somewhat lacking, so some of the code is based on examining existing code and headers and guessing at what it all means. > Also, it seems to me that if dev already exists, that you shouldn't > reset the driver and desc. This should be harmless, but if for some > reason you are called on an attached device, it could cause problems. it'll all go pear-shaped if you don't. if an ichwd device already exists, it is a leftover from a previous module load / unload cycle and the driver_t it references no longer exists. ichwd_identify() should probably KASSERT that the device it finds isn't attached - I'm pretty sure it can't happen. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no