From nobody@FreeBSD.org  Sun Nov 20 08:00:53 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4DE1816A420
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 20 Nov 2005 08:00:53 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3FF8443D66
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 20 Nov 2005 08:00:07 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id jAK806HA010784
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 20 Nov 2005 08:00:06 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id jAK806ni010783;
	Sun, 20 Nov 2005 08:00:06 GMT
	(envelope-from nobody)
Message-Id: <200511200800.jAK806ni010783@www.freebsd.org>
Date: Sun, 20 Nov 2005 08:00:06 GMT
From: Emmanuel GUEGAN <eguegan@assystembrime.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: D-Link NIC with VIA Rhine II, lost of Network and message displayed "vr0: rx packet lost"
X-Send-Pr-Version: www-2.3

>Number:         89305
>Category:       kern
>Synopsis:       [vr] [patch] D-Link NIC with VIA Rhine II, lost of Network and message displayed "vr0: rx packet lost"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    vwe
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 20 08:10:09 GMT 2005
>Closed-Date:    Sun Aug 08 21:05:26 UTC 2010
>Last-Modified:  Sun Aug 08 21:05:26 UTC 2010
>Originator:     Emmanuel GUEGAN
>Release:        6.0
>Organization:
Assystem FRance
>Environment:
FreeBSD myserv 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Sat Nov 19 15:04:45 CET 2005     root@myserv:/usr/obj/usr/src/sys/MYKERN  i386
  
>Description:
I 'm using a Via Rhine II 100mb pci network card on a samba server (celeron 450 MHz).

When I am doing a heavy net transfert (several windows pcs making big transfert  at the same time / network speed above 3~4 M Bytes/sec), after a while ( 1-2minutes) the message "vr0: rx packet lost" is displayed in loop and the network link is definitivly lost

>How-To-Repeat:
As decribe above, very heavy network transfert, after a little time, the probleme is systematic after a little while

>Fix:
The message "vr0: packet lost" is known both in the functions vr_poll_locked(...) and vr_intr(...) : 
                if (status & VR_ISR_RX_DROPPED) {
                        printf("vr%d: rx packet lost\n", sc->vr_unit);
                        ifp->if_ierrors++;
                }
when the flag VR_ISR_RX_DROPPED is up, it is displayed, but in the next segment 
the test (status & VR_ISR_RX_DROPPED) is missing to enter in the condition
so packetscannot be Tx above by vr_rxeoc(sc)

               if ((status & VR_ISR_RX_ERR) || (status & VR_ISR_RX_NOBUF) ||
                   (status & VR_ISR_RX_NOBUF) || (status & VR_ISR_RX_OFLOW))                  
                {
                       printf("vr%d: receive error (%04x)",
                               sc->vr_unit, status);
                ...
                        if (status & VR_ISR_RX_DROPPED)
                                printf(" packet lost");
                        printf("\n");
                        vr_rxeoc(sc);
                }

I propose this patch :

RCS file: RCS/if_vr.c,v
retrieving revision 1.1
diff -r1.1 if_vr.c
1198c1198,1200
<                   (status & VR_ISR_RX_NOBUF) || (status & VR_ISR_RX_OFLOW)) {
---
>                   (status & VR_ISR_RX_NOBUF) || (status & VR_ISR_RX_OFLOW)
>                       || (status & VR_ISR_RX_DROPPED)
>                       ) {
1281c1283,1285
<                   (status & VR_ISR_RX_NOBUF) || (status & VR_ISR_RX_OFLOW)) {
---
>                   (status & VR_ISR_RX_NOBUF) || (status & VR_ISR_RX_OFLOW)
>                       || (status & VR_ISR_RX_DROPPED)
>                       ) {

>Release-Note:
>Audit-Trail:

From: Volker <volker@vwsoft.com>
To: bug-followup@FreeBSD.org, eguegan@assystembrime.com
Cc:  
Subject: Re: kern/89305: [vr] [patch] D-Link NIC with VIA Rhine II, lost of
 Network and message displayed "vr0: rx packet lost"
Date: Sun, 09 Mar 2008 22:57:13 +0100

 Emmanuel,
 
 I'm sorry seeing your problem report untouched for quite some time now.
 
 Can you please report back if your problem is still valid even with a
 more recent release of FreeBSD (6.3/7.0)?
 
 If it's still a problem, I'm wondering if you can check Pyun's reworked
 vr driver and provide him feedback? For more information about his
 recent work, please have a look at PR kern/109477 which contains URLs
 for patches.
 
 Please give us feedback if your problem is not an issue anymore so we
 can go ahead and close this ticket.
 
 Thanks for reporting!
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/109477
State-Changed-From-To: open->feedback 
State-Changed-By: vwe 
State-Changed-When: Sun Mar 9 22:00:17 UTC 2008 
State-Changed-Why:  

Note that submitter has been asked for feedback. 


Responsible-Changed-From-To: freebsd-bugs->vwe 
Responsible-Changed-By: vwe 
Responsible-Changed-When: Sun Mar 9 22:00:17 UTC 2008 
Responsible-Changed-Why:  

track 

http://www.freebsd.org/cgi/query-pr.cgi?pr=89305 
State-Changed-From-To: feedback->suspended 
State-Changed-By: vwe 
State-Changed-When: Sat May 10 17:34:02 UTC 2008 
State-Changed-Why:  

no feedback received for quite some time - suspend 
to be closed after 6.[012] EOL date (soon) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=89305 
State-Changed-From-To: suspended->closed 
State-Changed-By: vwe 
State-Changed-When: Sun Aug 8 21:05:09 UTC 2010 
State-Changed-Why:  
old issue, unknown state, unsupported release 

http://www.freebsd.org/cgi/query-pr.cgi?pr=89305 
>Unformatted:
mail to submitter bounces with:
egu@clarkbuc.pointclark.net: connect to
    clarkbuc.pointclark.net[84.99.151.68]: Connection timed out

