From owner-freebsd-net@FreeBSD.ORG Sat Mar 10 06:29:05 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 29EE8106566C; Sat, 10 Mar 2012 06:29:05 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id DABD08FC12; Sat, 10 Mar 2012 06:29:04 +0000 (UTC) Received: by dald2 with SMTP id d2so2622182dal.13 for ; Fri, 09 Mar 2012 22:29:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=HEhtIkysrWzYsZLr5tz0wLxtypqPda5GsXqwMh1Agig=; b=iJ2USSZnfIv4fylwjkK4dMSD80ATVeXISxlF1XF2tdwmSFQN+Z/jAZiVXptF/zX5tF MFAvOW3x2g/BiQXAO1+Yo50mudaV4yXOTeBHlkbBmgfi99o8xiNxjtU73UWgMzVkueJY 0ngbLA6dRPiXDwr426mqbA2sS7uS7uHaZ7q3QF2zz4fQ00fp3fVRxHWhDzdwEIyhFKfc dz156/RU08Kwb8CWmO7WNblsMfAiYFSN6Ifk5PHmbIcdBnaqtQnm3dKJGLJ22N35/RRL a5aGIh+A+Wgum/0/8GWIo/hNEjewpI6KrqGn7rFQbCkOnK4mn7z9tiqAprf62AI+jM1k ATcQ== Received: by 10.68.224.225 with SMTP id rf1mr7539507pbc.133.1331360944605; Fri, 09 Mar 2012 22:29:04 -0800 (PST) Received: from pyunyh@gmail.com ([114.111.62.249]) by mx.google.com with ESMTPS id l1sm5743596pbe.54.2012.03.09.22.29.01 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 09 Mar 2012 22:29:03 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Sat, 10 Mar 2012 15:29:02 -0800 From: YongHyeon PYUN Date: Sat, 10 Mar 2012 15:29:02 -0800 To: Adrian Chadd Message-ID: <20120310232902.GA4566@michelle.cdnetworks.com> References: <4F594856.3030303@incore.de> 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: jfv@freebsd.org, freebsd-net@freebsd.org, Andreas Longwitz , 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 Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 06:29:05 -0000 On Fri, Mar 09, 2012 at 01:36:22AM -0800, Adrian Chadd wrote: > Hi! > > That's actually a really good catch! > > yongari/jfv, what do you think? > Give me some more time to verify it on one of i82550 controller I have. > > 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 > > ? 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