Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Oct 2005 10:06:35 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        frank@pinky.sax.de
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: How disable attachment of sio(4) driver to device?
Message-ID:  <20051021.100635.115989045.imp@bsdimp.com>
In-Reply-To: <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de>
References:  <200510210835.j9L8Zn2P001846@pinky.frank-behrens.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

Warner



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