From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 17:36:52 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2EA716A41F; Fri, 21 Oct 2005 17:36: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 3855043D46; Fri, 21 Oct 2005 17:36: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 j9LHaF0E027073; Fri, 21 Oct 2005 11:36:15 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 21 Oct 2005 11:37:39 -0600 (MDT) Message-Id: <20051021.113739.32720831.imp@bsdimp.com> To: jhb@FreeBSD.ORG From: "M. Warner Losh" In-Reply-To: <200510211216.37814.jhb@freebsd.org> References: <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de> <20051021.100635.115989045.imp@bsdimp.com> <200510211216.37814.jhb@freebsd.org> 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]); Fri, 21 Oct 2005 11:36:15 -0600 (MDT) Cc: frank@pinky.sax.de, freebsd-hackers@FreeBSD.ORG Subject: Re: How disable attachment of sio(4) driver to device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 17:36:52 -0000 In message: <200510211216.37814.jhb@freebsd.org> John Baldwin writes: : But you could hack the sio(4) driver to check its IO port and return ENXIO if : it has a certain value, for example. Yes. You could also do that. I have a tree somewhere that has some changes in this direction, but I was unsatisified with it. I set out to solve the 'I want SIO0 to be defined as PORT_B, since that's the only one my server exports via acpi, how the heck do I know what adress it is at, really?' problem too. devinfo says: sio0 pnpinfo _HID=PNP0501 _UID=1 at handle=\_SB_.PCI0.PX40.UAR1 sio1 pnpinfo _HID=PNP0501 _UID=2 at handle=\_SB_.PCI0.PX40.UAR2 I'd like to be able to say that sio0 is at handle=\_SB_.PCI0.PX40.UAR2 rather than some arbitrary address. Or that bge1 is at bge0 pnpinfo vendor=0x14e4 device=0x16a6 subvendor=0x14e4 subdevice=0x8009 class=0x020000 at slot=3 function=0 handle=\_SB_.PCI0.G0PA.LAN0 miibus0 brgphy0 pnpinfo oui=0x818 model=0x16 rev=0x2 at phyno=1 bge1 pnpinfo vendor=0x14e4 device=0x16a6 subvendor=0x14e4 subdevice=0x8009 class=0x020000 at slot=4 function=0 handle=\_SB_.PCI0.G0PA.LAN1 either at pci2.4.0 *OR* at handle=\_SB_.PCI0.G0PA.LAN1 (or even handle=LAN1). So there'd need to be some kind of bus specific mapping function that would say true or false if a given device_t on that bus matched the string presented. You could then say that the device at handle=UAR1 belongs to mydev3, and sio would never even be given a chance to bid on it. I'm not sure how to work this into the current hints paradigm... Warner