From nobody@FreeBSD.org  Wed Sep 12 01:27:20 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AA49616A418
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 12 Sep 2007 01:27:20 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 8831113C45A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 12 Sep 2007 01:27:20 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l8C1RKhP035234
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 12 Sep 2007 01:27:20 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.1/8.14.1/Submit) id l8C1RKLC035233;
	Wed, 12 Sep 2007 01:27:20 GMT
	(envelope-from nobody)
Message-Id: <200709120127.l8C1RKLC035233@www.freebsd.org>
Date: Wed, 12 Sep 2007 01:27:20 GMT
From: Mark Derbyshire <mark@taom.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: nfe driver hangs on boot (MSI K9N SLI Platinum)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         116295
>Category:       kern
>Synopsis:       nfe driver hangs on boot (MSI K9N SLI Platinum)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    yongari
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 12 01:30:02 GMT 2007
>Closed-Date:    Fri Sep 14 05:15:53 GMT 2007
>Last-Modified:  Fri Sep 14 05:20:01 GMT 2007
>Originator:     Mark Derbyshire
>Release:        7-CURRENT/6.2-RELEASE backport
>Organization:
>Environment:
FreeBSD freebsd.taom.com 6.2-RELEASE FreeBSD 6.2-RELEASE #10: Tue Sep 11 17:00:01 MDT 2007     root@freebsd.taom.com:/usr/obj/usr/src/sys/TAOM  amd64
>Description:
Driver hangs in an apparent interrupt loop on boot in nfe_int_task with the MSI K9N SLI Platinum motherboard. It seems to work fine on other MCPxx-based boards I tried. If nfe0 is not plugged to a live switch, the boot will succeed. However when nfe0 is plugged into a GbE, full-duplex switch it hangs every time. It does not matter whether nfe1 is plugged in for either of these cases. Revision 1.14 of if_nfe.c does not have this problem. Revision 1.17 appears to have introduced the bug.
>How-To-Repeat:
Plug nfe0 from a MSI K9N SLI Platinum motherboard into a GbE switch and boot the system. 
>Fix:
--- if_nfe.c.orig       2007-07-23 19:11:00.000000000 -0600
+++ if_nfe.c    2007-09-11 19:24:58.000000000 -0600
@@ -1930,18 +1930,18 @@
        }
 #endif
 
-       if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) {
-               NFE_UNLOCK(sc);
-               nfe_enable_intr(sc);
-               return;
-       }
-
        if (r & NFE_IRQ_LINK) {
                NFE_READ(sc, NFE_PHY_STATUS);
                NFE_WRITE(sc, NFE_PHY_STATUS, 0xf);
                DPRINTF(sc, "link state changed\n");
        }
 
+       if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) {
+               NFE_UNLOCK(sc);
+               nfe_enable_intr(sc);
+               return;
+       }
+
        domore = 0;
        /* check Rx ring */
        if (sc->nfe_framesize > MCLBYTES - ETHER_HDR_LEN)


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->yongari 
Responsible-Changed-By: yongari 
Responsible-Changed-When: Fri Sep 14 01:44:34 UTC 2007 
Responsible-Changed-Why:  
Grab. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116295 
State-Changed-From-To: open->closed 
State-Changed-By: yongari 
State-Changed-When: Fri Sep 14 05:14:44 UTC 2007 
State-Changed-Why:  
Patch committed to HEAD. 
Thanks a lot for reporting and patch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116295 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/116295: commit references a PR
Date: Fri, 14 Sep 2007 05:12:33 +0000 (UTC)

 yongari     2007-09-14 05:12:25 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/dev/nfe          if_nfe.c 
   Log:
   During boot(before setting IP address) PHY can generate link state
   change interrupt if the link is established with link parter. However
   interrupt handler didn't acknowledge the interrupt if nfe(4) was not
   running at the time of interrupt delivery. This caused endless
   interrupt generation. Fix the bug by acknowledging the interrupt
   regardless of running state of the driver.
   
   PR:     kern/116295
   Submitted by:   Mark Derbyshire (mark At taom dot com)
   Approved by:    re (kensmith)
   
   Revision  Changes    Path
   1.21      +6 -6      src/sys/dev/nfe/if_nfe.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
