diff options
author | smh <smh@FreeBSD.org> | 2013-02-27 00:35:40 +0000 |
---|---|---|
committer | smh <smh@FreeBSD.org> | 2013-02-27 00:35:40 +0000 |
commit | 256df5868727e3e8cfea69e423b68f1d5e04589e (patch) | |
tree | b09af5cd10562bb9567ae870ca239da2a2b51920 /sys/dev/mfi | |
parent | 3c9d9a484c356b0ab902d7216044b61d991bfc76 (diff) | |
download | FreeBSD-src-256df5868727e3e8cfea69e423b68f1d5e04589e.zip FreeBSD-src-256df5868727e3e8cfea69e423b68f1d5e04589e.tar.gz |
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
Diffstat (limited to 'sys/dev/mfi')
-rw-r--r-- | sys/dev/mfi/mfi.c | 4 | ||||
-rw-r--r-- | sys/dev/mfi/mfi_tbolt.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c index ed759fc..c74370b 100644 --- a/sys/dev/mfi/mfi.c +++ b/sys/dev/mfi/mfi.c @@ -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. diff --git a/sys/dev/mfi/mfi_tbolt.c b/sys/dev/mfi/mfi_tbolt.c index cce63c0..af83392 100644 --- a/sys/dev/mfi/mfi_tbolt.c +++ b/sys/dev/mfi/mfi_tbolt.c @@ -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); } /* |