From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 21 16:38:03 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 4297116A420 for ; Fri, 21 Oct 2005 16:38:03 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD5AE43D45 for ; Fri, 21 Oct 2005 16:38:02 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from [10.50.41.234] (Not Verified[10.50.41.234]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Fri, 21 Oct 2005 12:54:38 -0400 From: John Baldwin To: freebsd-hackers@freebsd.org Date: Fri, 21 Oct 2005 12:16:36 -0400 User-Agent: KMail/1.8.2 References: <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de> <20051021.100635.115989045.imp@bsdimp.com> In-Reply-To: <20051021.100635.115989045.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200510211216.37814.jhb@freebsd.org> Cc: frank@pinky.sax.de 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 16:38:03 -0000 On Friday 21 October 2005 12:06 pm, M. Warner Losh wrote: > In message: <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de> > > "Frank Behrens" writes: > : I want to use the second port with my driver. I had no luck with > : hint.sio.1.disabled="1", but hint.sio.1.flags="0x40" > : gave me the desired result: > : sio1: reserved for low-level i/o > > Allocate the resources it uses, and sio can't probe. > > : One partly working workaround I found is to patch the sio driver. If > : it does in DEVICE_PROBE(9) not return (0), but the value > : BUS_PROBE_DEFAULT, then my driver has a chance to attach. > : If my driver does not attach or another driver is loaded, the sio(4) > : attaches again and I have lost. Then I see only a reboot as solution > : to try my driver again. > > Right. There's a weakness in the current scheme in that one can't > rebid a device. I've been working on some patches for that. That's > the real way to solve this problem. > > Another "soltution" is to not have sio in your kernel while you are > debugging your driver. > > Another solution would be to have your driver use the tty layer > instead of banging the hardware directly, if that is compatible with > the goals of your driver. This solution isn't in quotes because for > some class of devices (say a keyboard driver for a sun or apple newton > keyboard that does serial), it might be the right one. > > : I think I did miss some important information, e.g. I could not find > : how the associations between PCI selectors (pciconf(8)) and device > : numers are made and what to insert in device.hints to modify this > : associations. > > There's no way to tie the plug and play location to a device instance > at this time. But you could hack the sio(4) driver to check its IO port and return ENXIO if it has a certain value, for example. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org