From owner-freebsd-stable@FreeBSD.ORG Tue Feb 26 07:36:45 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 9E80416A401 for ; Tue, 26 Feb 2008 07:36:45 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.171]) by mx1.freebsd.org (Postfix) with ESMTP id 6ED3B13C465 for ; Tue, 26 Feb 2008 07:36:45 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by wf-out-1314.google.com with SMTP id 25so1325071wfa.7 for ; Mon, 25 Feb 2008 23:36:44 -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=YKGTfaznAkMC2og01gT5/aKIDvKZZyx0Gh3L1xLCLb8=; b=MzomxYS94HdKIUyl7T9RB8OZ/FNvbQ5I7Ur1D4FqhTq19fUxNqKdotEpnR+kLmyNkpk91AGK1znPaOb08qC1iOsThrw5N4jgXE/IGbEt5mU1VL3s60W/kxCaWg/tscXgvIB88SEV7B1Bd1y4ztPLYto7/0pPcgAix16ggswkhSA= 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=EsVLXMNb4DyK2RshwD5reynjVFxkj0qccF84g9kosYWeOvz87XgzoDYSJRqJsx4WEmV8NepLpXhwqnE4Sbg6HHnaR2DTGYRsPDs7cjCbVQ4SvQBHdCp6af/IatXIIAB+WC9eeMmq3wxQmwiLtF/o7BD3TYuBjcn8KOrjxny7ETU= Received: by 10.142.86.7 with SMTP id j7mr3337847wfb.78.1204011404418; Mon, 25 Feb 2008 23:36:44 -0800 (PST) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTPS id 30sm11071905wfd.19.2008.02.25.23.36.41 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Feb 2008 23:36:43 -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 m1Q7aaFl049136 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 26 Feb 2008 16:36:36 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id m1Q7aYDD049135; Tue, 26 Feb 2008 16:36:34 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Tue, 26 Feb 2008 16:36:34 +0900 From: Pyun YongHyeon To: Andriy Gapon Message-ID: <20080226073633.GC47750@cdnetworks.co.kr> References: <47A3041D.5050402@icyb.net.ua> <20080201123603.GA14050@cdnetworks.co.kr> <47A321BB.1060708@icyb.net.ua> <47A32501.7080703@icyb.net.ua> <20080204035242.GA28554@cdnetworks.co.kr> <47C2BC50.5040702@icyb.net.ua> <47C2DBEF.301@icyb.net.ua> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="W/nzBZO5zC0uMSeA" Content-Disposition: inline In-Reply-To: <47C2DBEF.301@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: Tue, 26 Feb 2008 07:36:45 -0000 --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Feb 25, 2008 at 05:17:03PM +0200, Andriy Gapon wrote: > on 25/02/2008 15:02 Andriy Gapon said the following: > > on 04/02/2008 05:52 Pyun YongHyeon said the following: > >> On Fri, Feb 01, 2008 at 03:56:17PM +0200, Andriy Gapon wrote: > >> > on 01/02/2008 15:42 Andriy Gapon said the following: > >> > > on 01/02/2008 14:36 Pyun YongHyeon said the following: > >> > >> 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. > >> > >> > >> > >> > >> > > > >> > > Applied the patch with correction to actually print rev instead of dev > >> > > for the second time :-) > >> > > This is in working case: > >> > > devid : 269, revid : a3, pwr = 00000003 > >> > > >> > A clarification: I just applied the patch, recompiled and re-loaded the > >> > module. There was no reboot/poweroff/reset in between. > >> > > >> > > Will wait for the non-working situation. > >> > > > >> > > >> > >> Revert previous patch and try attached patch again and let me know > >> how it goes. > >> > >> > > > > Tried it - still no joy, the behavior is as before. > > If I gracefully reboot the machine or power down and then up, then > > everything is OK. But if I press "reset" button and boot up, the nfe > > interface is "dead". > > BTW, I kept the line for printing devid/revid/pwr and output is the same > > in all cases. > > > > Not sure if that is related but Linux forcedeth driver seems to do some > stuff that we don't do: > http://lxr.linux.no/linux+v2.6.24/drivers/net/forcedeth.c#L5271 > Nice catch! The register name in nfe(4) for NvRegMIIMask is NFE_SETUP_R4. According to Linux driver it's used for generating link state change interrupt. So I guess nfe(4) may have to clear the register in nfe_stop(). How about clearing the register as attached patch? (Sorry I couldn't test this ATM...) -- Regards, Pyun YongHyeon --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="nfe.linkchg.patch" --- if_nfe.c.orig 2008-02-02 04:36:24.000000000 +0900 +++ if_nfe.c 2008-02-26 16:32:45.000000000 +0900 @@ -2925,6 +2925,8 @@ /* disable Rx */ NFE_WRITE(sc, NFE_RX_CTL, 0); + NFE_WRITE(sc, NFE_SETUP_R4, 0); + /* disable interrupts */ nfe_disable_intr(sc); --W/nzBZO5zC0uMSeA--