diff options
author | sbruno <sbruno@FreeBSD.org> | 2013-05-31 03:14:49 +0000 |
---|---|---|
committer | sbruno <sbruno@FreeBSD.org> | 2013-05-31 03:14:49 +0000 |
commit | 8c6b9c054db44c817644e8a15165f08376cabf2b (patch) | |
tree | 8dca6687e49504e5941c0f799f9ebc4f67c8b417 /sys/dev | |
parent | d7efebc4db8c1b875c915fb1a2759cb9df4f2956 (diff) | |
download | FreeBSD-src-8c6b9c054db44c817644e8a15165f08376cabf2b.zip FreeBSD-src-8c6b9c054db44c817644e8a15165f08376cabf2b.tar.gz |
xpt_create_path() requires mfi_io_lock to be held, so do it.
mfi(4) doesn't panic on host startup now.
MFC this if svn 249468-242726 is shoveled back to stable/9
Obtained from: Yahoo! Inc.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/mfi/mfi_cam.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/mfi/mfi_cam.c b/sys/dev/mfi/mfi_cam.c index e66e8aa..b6ceb57 100644 --- a/sys/dev/mfi/mfi_cam.c +++ b/sys/dev/mfi/mfi_cam.c @@ -318,13 +318,16 @@ mfip_cam_rescan(struct mfi_softc *sc, uint32_t tid) } sim = camsc->sim; + mtx_lock(&sc->mfi_io_lock); if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(sim), tid, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { xpt_free_ccb(ccb); + mtx_unlock(&sc->mfi_io_lock); device_printf(sc->mfi_dev, "Cannot create path for bus rescan.\n"); return; } + mtx_unlock(&sc->mfi_io_lock); xpt_rescan(ccb); |