From owner-svn-src-head@FreeBSD.ORG Wed Feb 27 00:35:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C71A1DE6; Wed, 27 Feb 2013 00:35:41 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B866ED53; Wed, 27 Feb 2013 00:35:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1R0ZfNS028014; Wed, 27 Feb 2013 00:35:41 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1R0Zft7028012; Wed, 27 Feb 2013 00:35:41 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201302270035.r1R0Zft7028012@svn.freebsd.org> From: Steven Hartland Date: Wed, 27 Feb 2013 00:35:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r247367 - head/sys/dev/mfi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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, 27 Feb 2013 00:35:41 -0000 Author: smh Date: Wed Feb 27 00:35:40 2013 New Revision: 247367 URL: http://svnweb.freebsd.org/changeset/base/247367 Log: Fixes mfi panic on recused on non-recusive mutex MFI I/O lock Removes a mtx_unlock call for mfi_io_lock which is never aquired While I'm here fix a braceing style issue. Reviewed by: Doug Ambrisko Approved by: pjd (mentor) MFC after: 1 month Modified: head/sys/dev/mfi/mfi.c head/sys/dev/mfi/mfi_tbolt.c Modified: head/sys/dev/mfi/mfi.c ============================================================================== --- head/sys/dev/mfi/mfi.c Wed Feb 27 00:25:44 2013 (r247366) +++ head/sys/dev/mfi/mfi.c Wed Feb 27 00:35:40 2013 (r247367) @@ -723,10 +723,8 @@ mfi_attach(struct mfi_softc *sc) "hook\n"); return (EINVAL); } - if ((error = mfi_aen_setup(sc, 0), 0) != 0) { - mtx_unlock(&sc->mfi_io_lock); + if ((error = mfi_aen_setup(sc, 0), 0) != 0) return (error); - } /* * Register a shutdown handler. Modified: head/sys/dev/mfi/mfi_tbolt.c ============================================================================== --- head/sys/dev/mfi/mfi_tbolt.c Wed Feb 27 00:25:44 2013 (r247366) +++ head/sys/dev/mfi/mfi_tbolt.c Wed Feb 27 00:35:40 2013 (r247367) @@ -1194,6 +1194,7 @@ mfi_process_fw_state_chg_isr(void *arg) sc->hw_crit_error= 1; return ; } + mtx_unlock(&sc->mfi_io_lock); if ((error = mfi_tbolt_init_MFI_queue(sc)) != 0) return; @@ -1225,7 +1226,9 @@ mfi_process_fw_state_chg_isr(void *arg) /* * Initiate AEN (Asynchronous Event Notification) */ + mtx_unlock(&sc->mfi_io_lock); mfi_aen_setup(sc, sc->last_seq_num); + mtx_lock(&sc->mfi_io_lock); sc->issuepend_done = 1; device_printf(sc->mfi_dev, "second stage of reset " "complete, FW is ready now.\n"); @@ -1237,7 +1240,6 @@ mfi_process_fw_state_chg_isr(void *arg) device_printf(sc->mfi_dev, "mfi_process_fw_state_chg_isr " "called with unhandled value:%d\n", sc->adpreset); } - mtx_unlock(&sc->mfi_io_lock); } /*