Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Oct 2009 20:42:21 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
To:        freebsd-net@FreeBSD.org
Subject:   testers for bge(4) needed (possible fix for ASF + hang)
Message-ID:  <20091013203302.N5956@maildrop.int.zabbadoz.net>

next in thread | raw e-mail | index | archive | help
Hi,

this is believed to fix hangs upon boot when the interfaces are
configured and ASF is enabled.  As seen in the PRs, this is often
observed on HP servers.

In case you have a bge machine not affected by that it owuld be really
helpful if you could test the change anyway to assure this doesn't
break any of the several dozen chip revisions we couldn't test.

The patch is also fetchable from
http://people.freebsd.org/~bz/20091011-01-bge-asf.diff

In case it doesn't apply to your older version of the driver cleanly
let me know and I'll do a patch for your version as well.

In case you find a regression with that let me know immediately with:
uname -mr; dmesg | grep bge ; pciconf -lv | grep ^bge


Thanks a lot.
/bz

-- 
Bjoern A. Zeeb         It will not break if you know what you are doing.

---------- Forwarded message ----------
Date: Tue, 13 Oct 2009 20:22:12 +0000 (UTC)
From: Bjoern A. Zeeb <bz@FreeBSD.org>
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
     svn-src-head@freebsd.org
Subject: svn commit: r198049 - head/sys/dev/bge

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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091013203302.N5956>