From owner-svn-src-stable@FreeBSD.ORG Tue Nov 17 14:30:11 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 471FE1065693; Tue, 17 Nov 2009 14:30:10 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 350F88FC16; Tue, 17 Nov 2009 14:30:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHEU9iu012438; Tue, 17 Nov 2009 14:30:09 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHEU9PK012436; Tue, 17 Nov 2009 14:30:09 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200911171430.nAHEU9PK012436@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 17 Nov 2009 14:30:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199381 - stable/8/sys/dev/bge X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Nov 2009 14:30:11 -0000 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);