svn commit: r199434 - stable/6/sys/dev/bge

Bjoern A. Zeeb bz at FreeBSD.org
Tue Nov 17 20:49:09 UTC 2009


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


More information about the svn-src-all mailing list