From owner-freebsd-drivers@FreeBSD.ORG Mon Mar 14 14:42:38 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 CDC7D106566B for ; Mon, 14 Mar 2011 14:42:38 +0000 (UTC) (envelope-from brix@freebsd.org) Received: from solow.pil.dk (relay.pil.dk [195.41.47.164]) by mx1.freebsd.org (Postfix) with ESMTP id 892568FC16 for ; Mon, 14 Mar 2011 14:42:38 +0000 (UTC) Received: from druadan.brixandersen.dk (0x55534f5f.adsl.cybercity.dk [85.83.79.95]) by solow.pil.dk (Postfix) with ESMTPA id 906991CC006; Mon, 14 Mar 2011 15:42:36 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-7--315993280" From: Henrik Brix Andersen In-Reply-To: Date: Mon, 14 Mar 2011 15:42:33 +0100 Content-Transfer-Encoding: 7bit Message-Id: <4A3AEDA0-9AAA-4040-AC02-6416543A1B6D@freebsd.org> References: <3550EA55-ADDE-40AC-9C22-1FAC441A0BC8@freebsd.org> <0A707516-C7D1-4441-B17B-1273B6C256B0@FreeBSD.org> To: Philip Schulz X-Pgp-Agent: GPGMail 1.3.2 X-Mailer: Apple Mail (2.1082) Cc: freebsd-drivers@freebsd.org 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 14:42:38 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-7--315993280 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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. Regards, Brix --=20 Henrik Brix Andersen --Apple-Mail-7--315993280 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iEYEARECAAYFAk1+KVkACgkQv+Q4flTiePjWgQCaAw20bwDifOBmadAzmvv9Kjg6 uDcAn2hLt7AQkBBLeUxQxUbeE7OZ+QVY =Gk6m -----END PGP SIGNATURE----- --Apple-Mail-7--315993280--