From owner-freebsd-drivers@FreeBSD.ORG Mon Mar 14 15:44:34 2011 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41B261065670; Mon, 14 Mar 2011 15:44:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 153B28FC0C; Mon, 14 Mar 2011 15:44:34 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id BCFE246B89; Mon, 14 Mar 2011 11:44:33 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.10]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 515BB8A01B; Mon, 14 Mar 2011 11:44:33 -0400 (EDT) From: John Baldwin To: freebsd-drivers@freebsd.org Date: Mon, 14 Mar 2011 11:34:12 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <3550EA55-ADDE-40AC-9C22-1FAC441A0BC8@freebsd.org> <4A3AEDA0-9AAA-4040-AC02-6416543A1B6D@freebsd.org> In-Reply-To: <4A3AEDA0-9AAA-4040-AC02-6416543A1B6D@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201103141134.12832.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 14 Mar 2011 11:44:33 -0400 (EDT) Cc: Subject: Re: Allocating resources to isab children X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2011 15:44:34 -0000 On Monday, March 14, 2011 10:42:33 am Henrik Brix Andersen wrote: > Hi, > > On Mar 14, 2011, at 00:15, Philip Schulz wrote: > > I made my glxiic driver a child of isa(4) because I didn't know where > > else to put it. After all, the DIVIL contains a bunch of devices on > > legacy I/O addresses such as e.g. UARTs which are already managed by > > ISA device drivers. Also, I couldn't get glxiic to be a direct child > > of isab unless I added a device_add_child() to isab_attach() - > > something I didn't want to do because it would be non-generic. > > Finally, glxiic can't be a PCI device driver because on my system, the > > entire DIVIL announces itself as one single PCI function (15.0, seems > > to be the same on your system). If glxiic attached to that function, > > isab wouldn't be able to attach anymore and I'd lose all of the other > > ISA devices. Of course, I could have added the ISA bridge logic to > > glxiic as well, but then I'd have glxiic+isab merged in one driver. > > Right. I use DEVICE_IDENTIFY(9) to check the PCI device ID of the isab device and add a glxiic(4) child upon match. > This way, glxiic(4) becomes a child of isab. We could probably use this to replace a similar hack in place for one of the smbus(4) controller drivers (I think viapro or some such?) -- John Baldwin