Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Mar 2011 11:17:35 +0100
From:      Marius Strobl <marius@alchemy.franken.de>
To:        "Patrick M. Hausen" <hausen@punkt.de>
Cc:        freebsd-stable <freebsd-stable@freebsd.org>
Subject:   Re: Disable probing of bge1?
Message-ID:  <20110309101734.GA42208@alchemy.franken.de>
In-Reply-To: <B9B3E34F-AE93-41AB-A5F4-732B60A7F35A@punkt.de>
References:  <B9B3E34F-AE93-41AB-A5F4-732B60A7F35A@punkt.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 07, 2011 at 01:26:01PM +0100, Patrick M. Hausen wrote:
> Hi, all,
> 
> I just discovered a minor problem when updating some rather dated
> systems from FreeBSD 6.x to 7.x or 8.x.
> 
> The servers are Fujitsu Technology Solutions (former Fujitsu-Siemens)
> RX100 S4. The current generation of the same system is RX100 S6, so this
> is two generations old. Some of them still run fine in our datacenter, though.
> 
> While the S5 and S6 series features two gigabit ports and an additional
> network interface for out of band management (called iRMC, similar to HP's iLO),
> the S4 has only two gigabit ports and the iRMC interface is piggybacked to
> one of them.
> 
> In our standard setup we disable the first interface in the BIOS. If you do this,
> the physical port is available as a dedicated management interface to the iRMC
> and only the second IF is probed by FreeBSD 6.x as bge0.
> 
> Now I try to PXE boot an identically configured system via the remote serial
> console with FreeBSD 7. Everything runs fine, until the kernel probes the
> network interfaces. The last thing I see are messages about successful
> probing of both bge0 and bge1 and then my remote management connection
> and my console are gone.
> 
> I have to reset the BMC by literally pulling the power to get the iRMC back.
> 
> 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.
> 

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
===================================================================
--- /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;
 
+       if (device_get_unit(dev) == 1)
+               return (ENXIO);
+
        sc = device_get_softc(dev);
        sc->bge_dev = dev;

Marius




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