From owner-freebsd-new-bus@FreeBSD.ORG Thu Mar 18 00:09:51 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 C86BA16A4CE for ; Thu, 18 Mar 2004 00:09:51 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CFDC43D4C for ; Thu, 18 Mar 2004 00:09:51 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.10/8.12.9) with ESMTP id i2I89nkj014881 for ; Thu, 18 Mar 2004 01:09:50 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 18 Mar 2004 16:10:06 +0800 (CST) Message-Id: <20040318.161006.25162359.imp@bsdimp.com> To: new-bus@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: 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 08:09:51 -0000 : What is the correct way to fix the probe call incrementing problem? Typically this is done by checking to see if there's a child already. However, all the ISA drivers don't do this... At work we've worked around this problem like so: static void sub00798identify(driver_t * driver, device_t parent) { devclass_t dc; dc = devclass_find(DRIVERNAME); if (devclass_get_device(dc, 0) == NULL) { if (BUS_ADD_CHILD(parent, 0, DRIVERNAME, 0) == 0) panic("failed to add " DRIVERNAME); } } Warner