From owner-svn-src-head@FreeBSD.ORG Wed Sep 5 06:51:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1DCBA1065670; Wed, 5 Sep 2012 06:51:29 +0000 (UTC) (envelope-from silby@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 08F858FC15; Wed, 5 Sep 2012 06:51:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q856pSIg090890; Wed, 5 Sep 2012 06:51:28 GMT (envelope-from silby@svn.freebsd.org) Received: (from silby@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q856pSNB090888; Wed, 5 Sep 2012 06:51:28 GMT (envelope-from silby@svn.freebsd.org) Message-Id: <201209050651.q856pSNB090888@svn.freebsd.org> From: Mike Silbersack Date: Wed, 5 Sep 2012 06:51:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240128 - head/sys/dev/bxe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 06:51:29 -0000 Author: silby Date: Wed Sep 5 06:51:28 2012 New Revision: 240128 URL: http://svn.freebsd.org/changeset/base/240128 Log: Only stop the BXE controller if it was first started. Stopping an uninitialized controller can cause IPMI bus errors on some systems. Reviewed by: yongari Obtained from: McAfee, Inc. MFC after: 2 weeks Modified: head/sys/dev/bxe/if_bxe.c Modified: head/sys/dev/bxe/if_bxe.c ============================================================================== --- head/sys/dev/bxe/if_bxe.c Wed Sep 5 06:15:15 2012 (r240127) +++ head/sys/dev/bxe/if_bxe.c Wed Sep 5 06:51:28 2012 (r240128) @@ -3554,8 +3554,14 @@ bxe_shutdown(device_t dev) sc = device_get_softc(dev); DBENTER(BXE_INFO_LOAD | BXE_INFO_RESET | BXE_INFO_UNLOAD); + /* Stop the controller, but only if it was ever started. + * Stopping an uninitialized controller can cause + * IPMI bus errors on some systems. + */ BXE_CORE_LOCK(sc); - bxe_stop_locked(sc, UNLOAD_NORMAL); + if (sc->state != BXE_STATE_CLOSED) { + bxe_stop_locked(sc, UNLOAD_NORMAL); + } BXE_CORE_UNLOCK(sc); DBEXIT(BXE_INFO_LOAD | BXE_INFO_RESET | BXE_INFO_UNLOAD);