Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Oct 2005 11:37:39 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        jhb@FreeBSD.ORG
Cc:        frank@pinky.sax.de, freebsd-hackers@FreeBSD.ORG
Subject:   Re: How disable attachment of sio(4) driver to device?
Message-ID:  <20051021.113739.32720831.imp@bsdimp.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <200510211216.37814.jhb@freebsd.org>
            John Baldwin <jhb@FreeBSD.ORG> 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



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