From owner-freebsd-stable@FreeBSD.ORG Fri Feb 1 12:36:15 2008 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 DFED116A468 for ; Fri, 1 Feb 2008 12:36:14 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.235]) by mx1.freebsd.org (Postfix) with ESMTP id 8F8A913C459 for ; Fri, 1 Feb 2008 12:36:13 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by wx-out-0506.google.com with SMTP id i29so1021310wxd.7 for ; Fri, 01 Feb 2008 04:36:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; bh=rLG2Es0f8i5Lr6pclgoMNNWR4tRVojTZG21gjdmxV4E=; b=pg3eBWyMIvQOF1jMdlyp6bNIqZB2ECh+2jSF1jIXPxtanA9qCev6IBtXbBIukviXq6ccMbG14GT+DjW4wtQIgpNPlDLxSR8nUl+MP9tQCxOzghWdb1yWwQHXgUNS2HZAwBGUMO6b0wYCh+Ji9IAfUuifGOPGxislVelTuCcnclY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=P4q7FxDdhxIY+jZNhxcFgAHmV5KqLtu0XK+Ngyn+5h+PlbSo/ntGnejwAV/u147K/eh0k6/sU41nElDeLelFOzJCJApH2nKG5WwbRgsdcZC+LX95m0oY8k+Lhj0o4D6DVl6MPfqtIXIwUnw14SrSzKBi5rEA7ZNjArBJTB0ePkc= Received: by 10.142.80.7 with SMTP id d7mr2093603wfb.60.1201869372116; Fri, 01 Feb 2008 04:36:12 -0800 (PST) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTPS id 25sm5372925wra.31.2008.02.01.04.36.09 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 01 Feb 2008 04:36:11 -0800 (PST) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id m11Ca5nO015563 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 1 Feb 2008 21:36:05 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id m11Ca3gP015562; Fri, 1 Feb 2008 21:36:03 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Fri, 1 Feb 2008 21:36:03 +0900 From: Pyun YongHyeon To: Andriy Gapon Message-ID: <20080201123603.GA14050@cdnetworks.co.kr> References: <47A3041D.5050402@icyb.net.ua> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="h31gzZEtNLTqOjlF" Content-Disposition: inline In-Reply-To: <47A3041D.5050402@icyb.net.ua> User-Agent: Mutt/1.4.2.1i Cc: freebsd-stable@freebsd.org, yongari@freebsd.org Subject: Re: 6.3 nfe: strange behavior after hand X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2008 12:36:15 -0000 --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Feb 01, 2008 at 01:35:57PM +0200, Andriy Gapon wrote: > > I am using nfe on 6.3 amd63 system with the code from here: > http://www.f.csce.kyushu-u.ac.jp/~shigeaki/software/freebsd-nfe.html > > Everything is OK except for one small, but annoying problem. Sometimes > when my system hangs and I have to use reset button, nfe stops working > after reboot. ifconfig shows proper status and medium, there are no > kernel error/debug messages, on the surface everything seems good. But > if I try to ping a machine connected to the same switch I get "host > down" responses. So, no network at all. Unloading and reloading if_nfe > module doesn't help, various ifconfig re-configurations do not help too. > Although, if I do power off and then boot, everything is perfect again. > > Until a couple of weeks ago I used 6.2 amd64 and nve (patched to > recognize pci id of this card) and I never had such a problem. > > To un-enlightened me it seems like some resetting/re-initialization of > the card is not done properly by nfe. > > Additional info. > dmesg: > nfe0: port 0xc800-0xc807 > mem 0xfe02b000-0xfe02bfff irq 23 at device 20.0 on pci0 > miibus0: on nfe0 > e1000phy0: on miibus0 > e1000phy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, > 1000baseTX-FDX, auto > nfe0: Ethernet address: 00:18:f3:d4:43:1e > nfe0: [FAST] > > ifconfig (output is the same in both working and non-working cases): > nfe0: flags=8843 mtu 1500 > options=8 > inet 10.2.1.87 netmask 0xfffffc00 broadcast 10.2.3.255 > ether 00:18:f3:d4:43:1e > media: Ethernet autoselect (1000baseTX ) > status: active > > pciconf: > nfe0@pci0:20:0: class=0x068000 card=0x816a1043 chip=0x026910de rev=0xa3 > hdr=0x00 > vendor = 'Nvidia Corp' > device = 'MCP51 Network Bus Enumerator' > class = bridge > > > P.S. as always with network issues, I understand that it may be not so > simple, e.g. some interaction between the card and the switch, etc. > After applying attached patch and let me know the output of "devid : xxx, revid : xxx, pwr = xxx". It would be even better if you can show me the above message for working/non-working case. -- Regards, Pyun YongHyeon --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="nfe.diff1" --- if_nfe.c.orig 2008-01-18 10:50:48.000000000 +0900 +++ if_nfe.c 2008-02-01 21:30:27.000000000 +0900 @@ -770,6 +770,10 @@ DELAY(100); NFE_WRITE(sc, NFE_RXTX_CTL, NFE_RXTX_BIT2); pwr = NFE_READ(sc, NFE_PWR2_CTL); +#if 1 + printf("devid : %x, revid : %x, pwr = %08x\n", + sc->nfe_devid, sc->nfe_devid, pwr); +#endif pwr &= ~NFE_PWR2_WAKEUP_MASK; if (sc->nfe_revid >= 0xa3 && (sc->nfe_devid == PCI_PRODUCT_NVIDIA_NFORCE430_LAN1 || --h31gzZEtNLTqOjlF--