From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 4 08:48:36 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 67A31BD8; Mon, 4 Nov 2013 08:48:36 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 52DD624FE; Mon, 4 Nov 2013 08:48:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA48maSh083542; Mon, 4 Nov 2013 08:48:36 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA48maJh083541; Mon, 4 Nov 2013 08:48:36 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201311040848.rA48maJh083541@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 4 Nov 2013 08:48:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r257625 - stable/8/sys/dev/bce X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 08:48:36 -0000 Author: yongari Date: Mon Nov 4 08:48:35 2013 New Revision: 257625 URL: http://svnweb.freebsd.org/changeset/base/257625 Log: MFC r257307: Fix regression introduced in r235816. r235816 triggered kernel panic or hang after warm boot. Don't blindly restore BCE_EMAC_MODE media configuration in bce_reset(). If driver is about to shutdown it will invoke bce_reset() which in turn results in restoring BCE_EMAC_MODE media configuration. This operation seems to confuse controller firmware. Modified: stable/8/sys/dev/bce/if_bce.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/bce/ (props changed) Modified: stable/8/sys/dev/bce/if_bce.c ============================================================================== --- stable/8/sys/dev/bce/if_bce.c Mon Nov 4 08:47:36 2013 (r257624) +++ stable/8/sys/dev/bce/if_bce.c Mon Nov 4 08:48:35 2013 (r257625) @@ -5095,9 +5095,11 @@ bce_reset(struct bce_softc *sc, u32 rese bce_reset_exit: /* Restore EMAC Mode bits needed to keep ASF/IPMI running. */ - val = REG_RD(sc, BCE_EMAC_MODE); - val = (val & ~emac_mode_mask) | emac_mode_save; - REG_WR(sc, BCE_EMAC_MODE, val); + if (reset_code == BCE_DRV_MSG_CODE_RESET) { + val = REG_RD(sc, BCE_EMAC_MODE); + val = (val & ~emac_mode_mask) | emac_mode_save; + REG_WR(sc, BCE_EMAC_MODE, val); + } DBEXIT(BCE_VERBOSE_RESET); return (rc);