From owner-cvs-all Thu Jan 30 23:37: 9 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D277237B401; Thu, 30 Jan 2003 23:37:07 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83B7B43F3F; Thu, 30 Jan 2003 23:37:07 -0800 (PST) (envelope-from silby@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h0V7b7bv006103; Thu, 30 Jan 2003 23:37:07 -0800 (PST) (envelope-from silby@repoman.freebsd.org) Received: (from silby@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h0V7b70A006102; Thu, 30 Jan 2003 23:37:07 -0800 (PST) Message-Id: <200301310737.h0V7b70A006102@repoman.freebsd.org> From: Mike Silbersack Date: Thu, 30 Jan 2003 23:37:07 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/pci if_vr.c if_vrreg.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG silby 2003/01/30 23:37:06 PST Modified files: sys/pci if_vr.c if_vrreg.h Log: Fixes from Thomas Nystrom to fix hanging problems experienced by vr cards under load. This patch has been tested by Thomas and other for more than a month now, and all (known) hangs seem to be solved. Thomas's explanation of the patch: * Fix the problem with the printing of the RX-error. * Code from if_fet do better deal with the RX-recovery including a timeout of the RX-turnoff. * The call to vr_rxeof before vr_rxeoc have been moved to a point where the RX-part of the chip is turned off. Otherwise there is a window where new data could have been written to the buffer chain before the RX-part is turned off. If this happens the chip will see a busy rx-buffer. I have no evidence that this have occured but god knows what the chip will do in this case! * I have added a timeout of the TX-turnoff. I have checked and in my 900 MHz system the flags for turnoff (both RX & TX) is seen at the first check in the loop. * I could see that I got the VR_ISR_DROPPED interrupt sometimes and started to thinking about this. I then realized that no recovery is needed for this case and therefore I only count it as an rxerror (which was not done before). * Finally I have changed the FIFO RX threshhold to 128 bytes. When I did this the VR_ISR_DROPPED interrupt went away. Theory: The chip will receive a complete frame before it tries to write it out to memory then the RX threshold is set to store'n'forward. IF the frame is large AND the next rx frame also is large AND the bus is busy transfering a TX frame to the TX fifo THEN the second received frame wont fit in the FIFO and is then dropped. By having the RX threshold set to 128 the RX fifo is emptied faster. MFC after: 5 days Revision Changes Path 1.59 +72 -34 src/sys/pci/if_vr.c 1.15 +3 -0 src/sys/pci/if_vrreg.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message