From owner-cvs-src@FreeBSD.ORG Sat Apr 29 22:51:02 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from localhost.my.domain (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id B241916A40F; Sat, 29 Apr 2006 22:51:01 +0000 (UTC) (envelope-from davidxu@freebsd.org) From: David Xu To: John Baldwin Date: Sun, 30 Apr 2006 06:50:55 +0800 User-Agent: KMail/1.8.2 References: <200604282008.k3SK8Gqe045067@repoman.freebsd.org> In-Reply-To: <200604282008.k3SK8Gqe045067@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200604300650.55256.davidxu@freebsd.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/nve if_nve.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Apr 2006 22:51:02 -0000 On Saturday 29 April 2006 04:08, John Baldwin wrote: > jhb 2006-04-28 20:08:16 UTC > > FreeBSD src repository > > Modified files: > sys/dev/nve if_nve.c > Log: > The nvidia binary blob sometimes defers tx completion notification to the > OS dependent layer. Thus, the watchdog timer can go off when the tx > engine is working fine but the OS dependent layer just hasn't been called > to cleanup finished tx transactions. To workaround this, when the > watchdog fires, poke the binary blob to force it to flush any pending tx > completions. If this drops the pending tx count to zero then just return > without logging a message or resetting the chip. > > This reportedly fixes the 'device timeout()' errors with at least several > NF4 nve(4) parts. > > Submitted by: Nathan Alexander Whitehorn (code) > Submitted by: dg (inspiration for comment and explanation) > MFC after: 1 week > > Revision Changes Path > 1.21 +19 -1 src/sys/dev/nve/if_nve.c no change here, I still got the same timeout error, it is NForce 3 Ultra, when watchdog was triggered, the machine froze. I turned on 'force async mode', than the freezing went away, though timeout still occured. Only after changing TX_RING_SIZE to 251, the timeout problem completey went away even under heavy load, I got the number 251 from pfnQueryWriteSlots(), I think the default TX_RING_SIZE is too small for me. Index: if_nve.c =================================================================== RCS file: /home/ncvs/src/sys/dev/nve/if_nve.c,v retrieving revision 1.21 diff -u -r1.21 if_nve.c --- if_nve.c 28 Apr 2006 20:08:16 -0000 1.21 +++ if_nve.c 29 Apr 2006 22:36:58 -0000 @@ -650,7 +650,7 @@ 0, /* force speed */ 0, /* force full duplex */ 0, /* force mode */ - 0, /* force async mode */ + 1, /* force async mode */ &sc->linkup); if (error) { Index: if_nvereg.h =================================================================== RCS file: /home/ncvs/src/sys/dev/nve/if_nvereg.h,v retrieving revision 1.7 diff -u -r1.7 if_nvereg.h --- if_nvereg.h 7 Dec 2005 17:38:03 -0000 1.7 +++ if_nvereg.h 29 Apr 2006 22:36:58 -0000 @@ -51,7 +51,7 @@ #define NV_RID 0x10 -#define TX_RING_SIZE 64 +#define TX_RING_SIZE 251 #define RX_RING_SIZE 64 #define NV_MAX_FRAGS 32 // match adapter.h:ADAPTER_WRITE_DATA.sElement[]