From owner-freebsd-net@FreeBSD.ORG Fri Mar 9 00:20:02 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 63F27106566C for ; Fri, 9 Mar 2012 00:20:02 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from mail.incore.de (dss.incore.de [195.145.1.138]) by mx1.freebsd.org (Postfix) with ESMTP id 1D9868FC16 for ; Fri, 9 Mar 2012 00:20:02 +0000 (UTC) Received: from inetmail.dmz (inetmail.dmz [10.3.0.3]) by mail.incore.de (Postfix) with ESMTP id 95FAE5CE69 for ; Fri, 9 Mar 2012 01:01:28 +0100 (CET) X-Virus-Scanned: amavisd-new at incore.de Received: from mail.incore.de ([10.3.0.3]) by inetmail.dmz (inetmail.dmz [10.3.0.3]) (amavisd-new, port 10024) with LMTP id FI_H4_8meniA for ; Fri, 9 Mar 2012 01:01:27 +0100 (CET) Received: from mail.incore (fwintern.dmz [10.0.0.253]) by mail.incore.de (Postfix) with ESMTP id AC84C5CE61 for ; Fri, 9 Mar 2012 01:01:27 +0100 (CET) Received: from bsdmhs.longwitz (unknown [192.168.99.6]) by mail.incore (Postfix) with ESMTP id 5E515450A7 for ; Fri, 9 Mar 2012 01:01:27 +0100 (CET) Message-ID: <4F594856.3030303@incore.de> Date: Fri, 09 Mar 2012 01:01:26 +0100 From: Andreas Longwitz User-Agent: Thunderbird 2.0.0.19 (X11/20090113) MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Subject: Intel 82550 Pro/100 Ethernet and Microcode X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 00:20:02 -0000 Hi, recently I installed FreeBSD 8.2 Stable on some older machines with Intel 82550 and 82550C and found that the loading of microcode with the parameter link0 in the ifconfig command did not work anymore. The reason for this is the commit r223608 for if_fxp.c with the comment: Disable microcode loading for 82550 and 82550C controllers. Loading the microcode caused SCB timeouts. I do not agree with this motivation and try to explain why. Without loading the microcode on 82550(C) there is a problem with mount_nfs -U server:/bigdisk /mnt cp /mnt/bigfile bigfile NFS with UDP works with 8 KB blocks and the cp hangs after some seconds and you see SCB messages on the console. The reason is the TCO bug of the hardware mentioned in rcvbundl.h. This old hardware bug disappears after loading the microcode. All my hardware run without problems in FreeBSD 4.11, loading of microcode is done by the function fxp_load_ucode(). Later there was trouble with the loading of microcode, see kern/103332 and kern/118909. I have posted my solution for the problem to kern/103332 but unfortunately this PR is not online anymore and so I repeat my considerations here. The difference of the function fxp_load_ucode() of FreeBSD 4.11 and later versions is that this function in 4.11 has an own private memory buffer for construction of the microcode message. In later versions fxp_load_ucode() must use a memory buffer that is shared with other parts of the driver and these other parts of the driver have problems if the shared memory buffer was used by fxp_load_ucode() before. Thats the reason for "Loading microcode caused SCB timeouts". Therefore my proposal is to revert r223608 and to clean the used shared buffer at the end of the function fxp_load_ucode(). The following patch works for me for years now: --- if_fxp.c.orig 2012-01-26 12:43:09.000000000 +0100 +++ if_fxp.c 2012-03-08 23:41:32.000000000 +0100 @@ -3085,6 +3081,7 @@ sc->tunable_int_delay, uc->bundle_max_offset == 0 ? 0 : sc->tunable_bundle_max); sc->flags |= FXP_FLAG_UCODE; + bzero(cbp, (uc->length + 2) * sizeof(uint32_t)); } -- Dr. Andreas Longwitz Data Service GmbH Beethovenstr. 2A 23617 Stockelsdorf Amtsgericht Lübeck, HRB 318 BS Geschäftsführer: Wilfried Paepcke, Dr. Andreas Longwitz, Josef Flatau