Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Mar 2011 21:26:07 +1030
From:      "Daniel O'Connor" <doconnor@gsoft.com.au>
To:        Marius Strobl <marius@alchemy.franken.de>
Cc:        freebsd-stable <freebsd-stable@freebsd.org>
Subject:   Re: Disable probing of bge1?
Message-ID:  <7B8A7FC8-2547-4A63-8BCC-3CCDF39211D2@gsoft.com.au>
In-Reply-To: <20110309101734.GA42208@alchemy.franken.de>
References:  <B9B3E34F-AE93-41AB-A5F4-732B60A7F35A@punkt.de> <20110309101734.GA42208@alchemy.franken.de>

next in thread | previous in thread | raw e-mail | index | archive | help

On 09/03/2011, at 20:47, Marius Strobl wrote:
>> Is it possible to use some device.hints entry to prohibit the probing =
of bge1?
>> I think that would be the easiest solution to the problem? Other =
suggestions
>> are of course welcome. I can provide more config details and dmesg =
output
>> if needed.
>>=20
>=20
> Unfortunately, there's currently no generic way to disable probing/
> attaching of specific PCI devices. You'd need to hack the driver
> like in the following example to achieve that:
> Index: /usr/src/sys/dev/bge/if_bge.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- /usr/src/sys/dev/bge/if_bge.c       (revision 213448)
> +++ /usr/src/sys/dev/bge/if_bge.c       (working copy)
> @@ -2472,6 +2472,9 @@ bge_attach(device_t dev)
>        u_char eaddr[ETHER_ADDR_LEN];
>        int error, msicount, reg, rid, trys;
>=20
> +       if (device_get_unit(dev) =3D=3D 1)
> +               return (ENXIO);
> +
>        sc =3D device_get_softc(dev);
>        sc->bge_dev =3D dev;

Does..
hint.bge.0.disabled=3D"1"
in the loader work?

(I suspect not but am ever hopeful..)

--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C









Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7B8A7FC8-2547-4A63-8BCC-3CCDF39211D2>