From owner-freebsd-stable@FreeBSD.ORG Wed Mar 9 10:28:53 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83894106564A for ; Wed, 9 Mar 2011 10:28:53 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 0006B8FC12 for ; Wed, 9 Mar 2011 10:28:52 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id p29AHZVM042249; Wed, 9 Mar 2011 11:17:35 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id p29AHZ1l042248; Wed, 9 Mar 2011 11:17:35 +0100 (CET) (envelope-from marius) Date: Wed, 9 Mar 2011 11:17:35 +0100 From: Marius Strobl To: "Patrick M. Hausen" Message-ID: <20110309101734.GA42208@alchemy.franken.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-stable Subject: Re: Disable probing of bge1? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2011 10:28:53 -0000 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