Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2008 16:36:34 +0900
From:      Pyun YongHyeon <pyunyh@gmail.com>
To:        Andriy Gapon <avg@icyb.net.ua>
Cc:        freebsd-stable@freebsd.org, yongari@freebsd.org
Subject:   Re: 6.3 nfe: strange behavior after hand
Message-ID:  <20080226073633.GC47750@cdnetworks.co.kr>
In-Reply-To: <47C2DBEF.301@icyb.net.ua>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080226073633.GC47750>