Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Oct 2005 12:16:36 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-hackers@freebsd.org
Cc:        frank@pinky.sax.de
Subject:   Re: How disable attachment of sio(4) driver to device?
Message-ID:  <200510211216.37814.jhb@freebsd.org>
In-Reply-To: <20051021.100635.115989045.imp@bsdimp.com>
References:  <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de> <20051021.100635.115989045.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 21 October 2005 12:06 pm, M. Warner Losh wrote:
> In message: <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de>
>
>             "Frank Behrens" <frank@pinky.sax.de> 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 <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510211216.37814.jhb>