From owner-freebsd-drivers@FreeBSD.ORG Sun Jan 15 04:14:52 2006 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 98F9716A420 for ; Sun, 15 Jan 2006 04:14:52 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F74D43D49 for ; Sun, 15 Jan 2006 04:14:52 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k0F4DCTA064421; Sat, 14 Jan 2006 21:13:16 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 14 Jan 2006 21:13:12 -0700 (MST) Message-Id: <20060114.211312.74693697.imp@bsdimp.com> To: sds@jazzie.com From: Warner Losh In-Reply-To: <43C98205.70002@jazzie.com> References: <43C98205.70002@jazzie.com> 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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 14 Jan 2006 21:13:17 -0700 (MST) Cc: freebsd-drivers@freebsd.org Subject: Re: if_ed_isa.c change to support pnp on compaq lte dock 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: Sun, 15 Jan 2006 04:14:52 -0000 > This is regarding 5.4-RELEASE-p9 running on a Compaq LTE (Pentium-based) > laptop connected to a docking station. A patch for if_ed_isa.c is > included below. The Compaq LTE docking station includes an > ne2000-compatible ethernet interface, and using device.hints that match > the port and irq configured in the bios works just fine when booting > from a powered-off state. OK. > The system has a plug-n-play bios that knows about this device: > PNP8160: adding irq mask 0x800 > PNP8160: adding io range 0x340-0x35f, size=0x20, align=0x20 > pnpbios: handle 21 device ID PNP8160 (6081d041) > But the ed driver in 5.4-RELEASE doesn't attach to it automatically. > I made the obvious change, adding the device id to the table: > > *** if_ed_isa.c 2006/01/13 19:23:23 1.1 > --- if_ed_isa.c 2006/01/13 19:25:18 > *************** > *** 59,64 **** > --- 59,65 ---- > { 0x0090252a, NULL }, /* JQE9000 */ > { 0x0020832e, NULL }, /* KTC2000 */ > { 0x4cf48906, NULL }, /* ATIf44c */ > + { 0x6081d041, NULL }, /* PNP8160 */ > { 0, NULL } > }; > > After removing the device.hints, the system now reports: > ed0: at port 0x340-0x35f irq 11 on isa0 > both on cold boots and warm restarts, and does not hang. Hurray! > > Was there a better way to accomplish this? If no, can the change to add > this device id get incorporated into future FreeBSD releases? Committed. This is the best way to add an ID. Warner