Date: Thu, 30 Jan 2003 23:37:07 -0800 (PST) From: Mike Silbersack <silby@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/pci if_vr.c if_vrreg.h Message-ID: <200301310737.h0V7b70A006102@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301310737.h0V7b70A006102>