From owner-freebsd-net@FreeBSD.ORG Fri Mar 9 09:36:24 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D4E21065672 for ; Fri, 9 Mar 2012 09:36:24 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id D219C8FC18 for ; Fri, 9 Mar 2012 09:36:23 +0000 (UTC) Received: by lboi15 with SMTP id i15so361480lbo.13 for ; Fri, 09 Mar 2012 01:36:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Sq/jY0aDOMdSClKlsGV5R/4qRYM0q2/rHwlez9QlteY=; b=GluJiZTeo6cYnL6+WykJNM2G1Q7tWj14S/RuxLIudecr2LG6R+L3DDQE+w3fddKEIu 8cV7K750RHuyRCAL8slDdbWIGX57tAA6uxv4BMC8oNl7i7QzXOmDH9+G2Ki/eZx5fvgf 9CbeunkG6Fkk2D21QsFPGZvl9FXLGsdXynDXGms2zjOb3N57HawL3Nixg59xLuMAQA+X Fj80/7iSHh+QuTU+DNq3BypXqg81mTroxFOwcFQmWCA4J5rsod6WpAHNvWnVkYpFJxhk 6cbSbVl7GYpdxQAhRlyGiKOAeLNBCNhUsOHequFg38kvMd/YgBeMpc/TSoGogpmiAVte 9U4A== MIME-Version: 1.0 Received: by 10.152.132.132 with SMTP id ou4mr1107305lab.26.1331285782209; Fri, 09 Mar 2012 01:36:22 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.112.13.18 with HTTP; Fri, 9 Mar 2012 01:36:22 -0800 (PST) In-Reply-To: <4F594856.3030303@incore.de> References: <4F594856.3030303@incore.de> Date: Fri, 9 Mar 2012 01:36:22 -0800 X-Google-Sender-Auth: jypPmw8Oir_YRbdTudFmO3jsMPY Message-ID: From: Adrian Chadd To: Andreas Longwitz Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: jfv@freebsd.org, freebsd-net@freebsd.org, Pyun YongHyeon Subject: Re: 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 09:36:24 -0000 Hi! That's actually a really good catch! yongari/jfv, what do you think? Adrian On 8 March 2012 16:01, Andreas Longwitz wrote: > 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 > =A0 mount_nfs -U server:/bigdisk /mnt > =A0 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 =A0 =A0 =A0 2012-01-26 12:43:09.000000000 +0100 > +++ if_fxp.c =A0 =A02012-03-08 23:41:32.000000000 +0100 > @@ -3085,6 +3081,7 @@ > =A0 =A0 =A0 =A0 =A0 =A0sc->tunable_int_delay, > =A0 =A0 =A0 =A0 =A0 =A0uc->bundle_max_offset =3D=3D 0 ? 0 : sc->tunable_b= undle_max); > =A0 =A0 =A0 =A0sc->flags |=3D FXP_FLAG_UCODE; > + =A0 =A0 =A0 bzero(cbp, (uc->length + 2) * sizeof(uint32_t)); > =A0} > > > -- > Dr. Andreas Longwitz > > Data Service GmbH > Beethovenstr. 2A > 23617 Stockelsdorf > Amtsgericht L=FCbeck, HRB 318 BS > Gesch=E4ftsf=FChrer: Wilfried Paepcke, Dr. Andreas Longwitz, Josef Flatau > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"