From nobody@FreeBSD.org  Thu Sep 13 09:07:34 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 D76D816A418
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 13 Sep 2007 09:07:34 +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 DFCF013C478
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 13 Sep 2007 09:07:34 +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 l8D97Y1j039169
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 13 Sep 2007 09:07:34 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.1/8.14.1/Submit) id l8D97Y0x039168;
	Thu, 13 Sep 2007 09:07:34 GMT
	(envelope-from nobody)
Message-Id: <200709130907.l8D97Y0x039168@www.freebsd.org>
Date: Thu, 13 Sep 2007 09:07:34 GMT
From: Lawrence Farr <bsd-current@epcdirect.co.uk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Solid hang with bge interface
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         116328
>Category:       kern
>Synopsis:       [bge]: Solid hang with bge interface
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bz
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 13 09:10:06 GMT 2007
>Closed-Date:    Tue Nov 17 20:59:35 UTC 2009
>Last-Modified:  Tue Nov 17 20:59:35 UTC 2009
>Originator:     Lawrence Farr
>Release:        CURRENT
>Organization:
>Environment:
FreeBSD 7.0-CURRENT #1: Mon Aug 20 16:42:08 BST 2007
>Description:
I have a Supermicro H8DAR-T based server, that was happily 
running 6-stable from last year sometime. I swapped it out and
have been trying to get -CURRENT installed on it but it hangs
solid as soon as you configure the bge0 interface. The bge1
interface will work occasionally tho. To try and rule out a 
hardware fault I booted an AMD64-6.0RC1 cd that I had, which 
had no problems at all with the interface: 

http://www.epcdirect.com/bootlog/6boot.txt

But the current snapshot from June, and from todays source
hangs solid as soon as you try to set up the bge0 interface.

http://www.epcdirect.com/bootlog/currentboot.txt

As you can see, it hangs solid at "Setting hostname".

I've also removed the 3ware card "just in case" but it made
no difference. Latest BIOS too. I found some references to
a similar problem with bge recently too:

http://lists.freebsd.org/pipermail/freebsd-current/2007-August/075998.html


>How-To-Repeat:
Install CURRENT on a Supermicro, IBM or HP machine with this card and use the interface. Tested on i386 and AMD64 on Supermicro hardware here.
>Fix:
6-STABLE does not have the issue.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: remko 
Responsible-Changed-When: Fri Sep 21 06:15:58 UTC 2007 
Responsible-Changed-Why:  
Reassign to networking team 

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

From: "Lawrence Farr" <l.farr@epcdirect.co.uk>
To: <bug-followup@FreeBSD.org>,
	<bsd-current@epcdirect.co.uk>
Cc:  
Subject: Re: kern/116328: [bge]: Solid hang with bge interface
Date: Tue, 23 Oct 2007 16:18:04 +0100

 Setting hw.bge.allow_asf="0" at the loader prompt fixes it for me, 
 as per the mail to freebsd-current by Anders Nordby:
 
 http://www.nabble.com/HP-Proliant-system-freezes-when-bge-NIC-is-used-tf4666
 838.html
 
Responsible-Changed-From-To: freebsd-net->bz 
Responsible-Changed-By: bz 
Responsible-Changed-When: Mon Oct 12 21:56:26 UTC 2009 
Responsible-Changed-Why:  
Take for the moment. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/116328: commit references a PR
Date: Tue, 13 Oct 2009 20:22:27 +0000 (UTC)

 Author: bz
 Date: Tue Oct 13 20:22:12 2009
 New Revision: 198049
 URL: http://svn.freebsd.org/changeset/base/198049
 
 Log:
   Immediately after clearing a pending callout that didn't make it due
   to the lock we hold, disable interrupts, and announce to the firmware
   that we are shutting down. Especially do this before disabling blocks.
   
   This makes some types of machines with asf enabled no longer hang upon
   boot, when we start configuring the interface.
   
   PR:			i386/96382, kern/100410, kern/122252, kern/116328
   Reported by:		erwin
   Hardware provided by:	TDC A/S
   Reviewed by:		stas
   Tested by:		stas
 
 Modified:
   head/sys/dev/bge/if_bge.c
 
 Modified: head/sys/dev/bge/if_bge.c
 ==============================================================================
 --- head/sys/dev/bge/if_bge.c	Tue Oct 13 20:21:17 2009	(r198048)
 +++ head/sys/dev/bge/if_bge.c	Tue Oct 13 20:22:12 2009	(r198049)
 @@ -4270,6 +4270,16 @@ bge_stop(struct bge_softc *sc)
  
  	callout_stop(&sc->bge_stat_ch);
  
 +	/* Disable host interrupts. */
 +	BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
 +	bge_writembx(sc, BGE_MBX_IRQ0_LO, 1);
 +
 +	/*
 +	 * Tell firmware we're shutting down.
 +	 */
 +	bge_stop_fw(sc);
 +	bge_sig_pre_reset(sc, BGE_RESET_STOP);
 +
  	/*
  	 * Disable all of the receiver blocks.
  	 */
 @@ -4309,16 +4319,6 @@ bge_stop(struct bge_softc *sc)
  		BGE_CLRBIT(sc, BGE_MARB_MODE, BGE_MARBMODE_ENABLE);
  	}
  
 -	/* Disable host interrupts. */
 -	BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
 -	bge_writembx(sc, BGE_MBX_IRQ0_LO, 1);
 -
 -	/*
 -	 * Tell firmware we're shutting down.
 -	 */
 -
 -	bge_stop_fw(sc);
 -	bge_sig_pre_reset(sc, BGE_RESET_STOP);
  	bge_reset(sc);
  	bge_sig_legacy(sc, BGE_RESET_STOP);
  	bge_sig_post_reset(sc, BGE_RESET_STOP);
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/116328: commit references a PR
Date: Tue, 17 Nov 2009 14:30:26 +0000 (UTC)

 Author: bz
 Date: Tue Nov 17 14:30:09 2009
 New Revision: 199381
 URL: http://svn.freebsd.org/changeset/base/199381
 
 Log:
   MFC r198049:
   
     Immediately after clearing a pending callout that didn't make it due
     to the lock we hold, disable interrupts, and announce to the firmware
     that we are shutting down. Especially do this before disabling blocks.
   
     This makes some types of machines with asf enabled no longer hang upon
     boot, when we start configuring the interface.
   
   PR:	i386/96382, kern/100410, kern/122252, kern/116328
 
 Modified:
   stable/8/sys/dev/bge/if_bge.c
 Directory Properties:
   stable/8/sys/   (props changed)
   stable/8/sys/amd64/include/xen/   (props changed)
   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
   stable/8/sys/contrib/dev/acpica/   (props changed)
   stable/8/sys/contrib/pf/   (props changed)
   stable/8/sys/dev/xen/xenpci/   (props changed)
 
 Modified: stable/8/sys/dev/bge/if_bge.c
 ==============================================================================
 --- stable/8/sys/dev/bge/if_bge.c	Tue Nov 17 14:23:09 2009	(r199380)
 +++ stable/8/sys/dev/bge/if_bge.c	Tue Nov 17 14:30:09 2009	(r199381)
 @@ -4218,6 +4218,16 @@ bge_stop(struct bge_softc *sc)
  
  	callout_stop(&sc->bge_stat_ch);
  
 +	/* Disable host interrupts. */
 +	BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
 +	bge_writembx(sc, BGE_MBX_IRQ0_LO, 1);
 +
 +	/*
 +	 * Tell firmware we're shutting down.
 +	 */
 +	bge_stop_fw(sc);
 +	bge_sig_pre_reset(sc, BGE_RESET_STOP);
 +
  	/*
  	 * Disable all of the receiver blocks.
  	 */
 @@ -4257,16 +4267,6 @@ bge_stop(struct bge_softc *sc)
  		BGE_CLRBIT(sc, BGE_MARB_MODE, BGE_MARBMODE_ENABLE);
  	}
  
 -	/* Disable host interrupts. */
 -	BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
 -	bge_writembx(sc, BGE_MBX_IRQ0_LO, 1);
 -
 -	/*
 -	 * Tell firmware we're shutting down.
 -	 */
 -
 -	bge_stop_fw(sc);
 -	bge_sig_pre_reset(sc, BGE_RESET_STOP);
  	bge_reset(sc);
  	bge_sig_legacy(sc, BGE_RESET_STOP);
  	bge_sig_post_reset(sc, BGE_RESET_STOP);
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/116328: commit references a PR
Date: Tue, 17 Nov 2009 20:48:54 +0000 (UTC)

 Author: bz
 Date: Tue Nov 17 20:48:32 2009
 New Revision: 199433
 URL: http://svn.freebsd.org/changeset/base/199433
 
 Log:
   MFC r198049:
   
     Immediately after clearing a pending callout that didn't make it due
     to the lock we hold, disable interrupts, and announce to the firmware
     that we are shutting down. Especially do this before disabling blocks.
   
     This makes some types of machines with asf enabled no longer hang upon
     boot, when we start configuring the interface.
   
   PR:	i386/96382, kern/100410, kern/122252, kern/116328
 
 Modified:
   stable/7/sys/dev/bge/if_bge.c
 Directory Properties:
   stable/7/sys/   (props changed)
   stable/7/sys/contrib/pf/   (props changed)
 
 Modified: stable/7/sys/dev/bge/if_bge.c
 ==============================================================================
 --- stable/7/sys/dev/bge/if_bge.c	Tue Nov 17 20:45:49 2009	(r199432)
 +++ stable/7/sys/dev/bge/if_bge.c	Tue Nov 17 20:48:32 2009	(r199433)
 @@ -4213,6 +4213,16 @@ bge_stop(struct bge_softc *sc)
  
  	callout_stop(&sc->bge_stat_ch);
  
 +	/* Disable host interrupts. */
 +	BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
 +	bge_writembx(sc, BGE_MBX_IRQ0_LO, 1);
 +
 +	/*
 +	 * Tell firmware we're shutting down.
 +	 */
 +	bge_stop_fw(sc);
 +	bge_sig_pre_reset(sc, BGE_RESET_STOP);
 +
  	/*
  	 * Disable all of the receiver blocks.
  	 */
 @@ -4252,16 +4262,6 @@ bge_stop(struct bge_softc *sc)
  		BGE_CLRBIT(sc, BGE_MARB_MODE, BGE_MARBMODE_ENABLE);
  	}
  
 -	/* Disable host interrupts. */
 -	BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
 -	bge_writembx(sc, BGE_MBX_IRQ0_LO, 1);
 -
 -	/*
 -	 * Tell firmware we're shutting down.
 -	 */
 -
 -	bge_stop_fw(sc);
 -	bge_sig_pre_reset(sc, BGE_RESET_STOP);
  	bge_reset(sc);
  	bge_sig_legacy(sc, BGE_RESET_STOP);
  	bge_sig_post_reset(sc, BGE_RESET_STOP);
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/116328: commit references a PR
Date: Tue, 17 Nov 2009 20:49:31 +0000 (UTC)

 Author: bz
 Date: Tue Nov 17 20:49:09 2009
 New Revision: 199434
 URL: http://svn.freebsd.org/changeset/base/199434
 
 Log:
   MFC r198049:
   
     Immediately after clearing a pending callout that didn't make it due
     to the lock we hold, disable interrupts, and announce to the firmware
     that we are shutting down. Especially do this before disabling blocks.
   
     This makes some types of machines with asf enabled no longer hang upon
     boot, when we start configuring the interface.
   
   PR:	i386/96382, kern/100410, kern/122252, kern/116328
 
 Modified:
   stable/6/sys/dev/bge/if_bge.c
 Directory Properties:
   stable/6/sys/   (props changed)
   stable/6/sys/conf/   (props changed)
   stable/6/sys/contrib/pf/   (props changed)
   stable/6/sys/dev/cxgb/   (props changed)
 
 Modified: stable/6/sys/dev/bge/if_bge.c
 ==============================================================================
 --- stable/6/sys/dev/bge/if_bge.c	Tue Nov 17 20:48:32 2009	(r199433)
 +++ stable/6/sys/dev/bge/if_bge.c	Tue Nov 17 20:49:09 2009	(r199434)
 @@ -4146,6 +4146,16 @@ bge_stop(struct bge_softc *sc)
  
  	callout_stop(&sc->bge_stat_ch);
  
 +	/* Disable host interrupts. */
 +	BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
 +	bge_writembx(sc, BGE_MBX_IRQ0_LO, 1);
 +
 +	/*
 +	 * Tell firmware we're shutting down.
 +	 */
 +	bge_stop_fw(sc);
 +	bge_sig_pre_reset(sc, BGE_RESET_STOP);
 +
  	/*
  	 * Disable all of the receiver blocks.
  	 */
 @@ -4185,16 +4195,6 @@ bge_stop(struct bge_softc *sc)
  		BGE_CLRBIT(sc, BGE_MARB_MODE, BGE_MARBMODE_ENABLE);
  	}
  
 -	/* Disable host interrupts. */
 -	BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
 -	bge_writembx(sc, BGE_MBX_IRQ0_LO, 1);
 -
 -	/*
 -	 * Tell firmware we're shutting down.
 -	 */
 -
 -	bge_stop_fw(sc);
 -	bge_sig_pre_reset(sc, BGE_RESET_STOP);
  	bge_reset(sc);
  	bge_sig_legacy(sc, BGE_RESET_STOP);
  	bge_sig_post_reset(sc, BGE_RESET_STOP);
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: bz 
State-Changed-When: Tue Nov 17 20:58:05 UTC 2009 
State-Changed-Why:  
There have been a few driver updates since this report. 
The latest commit seems to eliminate boot hangup problems 
with servers also having a (shared) iLo/IPMI port. 
Thanks a lot for reporting; please feel free to re-open should 
the problems still exist after an update to a latest stable branch. 

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