From nobody@FreeBSD.org  Tue Feb  7 07:46:28 2006
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 1EC7416A420
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  7 Feb 2006 07:46:28 +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 E04C643D46
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  7 Feb 2006 07:46:27 +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 k177kR9q043735
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 7 Feb 2006 07:46:27 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k177kRQq043734;
	Tue, 7 Feb 2006 07:46:27 GMT
	(envelope-from nobody)
Message-Id: <200602070746.k177kRQq043734@www.freebsd.org>
Date: Tue, 7 Feb 2006 07:46:27 GMT
From: Mihail Balikov <mihail.balikov@interbgc.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] em(4) wedges with high traffic 
X-Send-Pr-Version: www-2.3

>Number:         92948
>Category:       kern
>Synopsis:       [em] [patch] em(4) wedges with high traffic
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    glebius
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 07 07:50:03 GMT 2006
>Closed-Date:    Thu Feb 16 12:45:48 GMT 2006
>Last-Modified:  Thu Feb 16 12:45:48 GMT 2006
>Originator:     Mihail Balikov
>Release:        7.0-Current
>Organization:
>Environment:
FreeBSD curr 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Sat Dec 17 11:36:50 EET 2005 root@curr:/usr/obj/usr/src/sys/joiner i386
>Description:
Interface watchdog fires, if tx descriptor ring is not emptied for EM_TX_TIMEOUT seconds.
              
>How-To-Repeat:
              
>Fix:
Following comments in em(4) code, watchdog timer should be restarted if we process some descriptors, but current code restarts timer if no descriptors are freed (num_avail == adapter->num_tx_desc_avail)
 
  * If there are no pending descriptors, clear the timeout. Otherwise,
  * if some descriptors have been freed, restart the timeout.

It seems to be "typo" bug, this patch fixes problem for me

--- em.060207.diff begins here ---
--- if_em.c Wed Feb  1 19:42:55 2006
+++ if_em.c.new Tue Feb  7 08:43:03 2006
@@ -2744,7 +2744,7 @@
                 ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
                 if (num_avail == adapter->num_tx_desc)
                         ifp->if_timer = 0;
-                else if (num_avail == adapter->num_tx_desc_avail)
+                else if (num_avail != adapter->num_tx_desc_avail)
                         ifp->if_timer = EM_TX_TIMEOUT;
         }
         adapter->num_tx_desc_avail = num_avail;
--- em.060207.diff ends here ---


  
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->glebius 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Tue Feb 7 13:26:28 UTC 2006 
Responsible-Changed-Why:  
I'm handling this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92948 
State-Changed-From-To: open->patched 
State-Changed-By: glebius 
State-Changed-When: Thu Feb 9 12:57:30 UTC 2006 
State-Changed-Why:  
Fixed in HEAD. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92948 
State-Changed-From-To: patched->closed 
State-Changed-By: glebius 
State-Changed-When: Thu Feb 16 12:45:23 UTC 2006 
State-Changed-Why:  
Merged to RELENG_5 and RELENG_6. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92948 
>Unformatted:
