mfi_cam.c (249468) | mfi_cam.c (251172) |
---|---|
1/*- 2 * Copyright 2007 Scott Long 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright 2007 Scott Long 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/dev/mfi/mfi_cam.c 249468 2013-04-14 09:55:48Z mav $"); | 28__FBSDID("$FreeBSD: head/sys/dev/mfi/mfi_cam.c 251172 2013-05-31 03:14:49Z sbruno $"); |
29 30#include "opt_mfi.h" 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/kernel.h> 35#include <sys/malloc.h> 36#include <sys/module.h> --- 276 unchanged lines hidden (view full) --- 313 ccb = xpt_alloc_ccb_nowait(); 314 if (ccb == NULL) { 315 device_printf(sc->mfi_dev, 316 "Cannot allocate ccb for bus rescan.\n"); 317 return; 318 } 319 320 sim = camsc->sim; | 29 30#include "opt_mfi.h" 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/kernel.h> 35#include <sys/malloc.h> 36#include <sys/module.h> --- 276 unchanged lines hidden (view full) --- 313 ccb = xpt_alloc_ccb_nowait(); 314 if (ccb == NULL) { 315 device_printf(sc->mfi_dev, 316 "Cannot allocate ccb for bus rescan.\n"); 317 return; 318 } 319 320 sim = camsc->sim; |
321 mtx_lock(&sc->mfi_io_lock); |
|
321 if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(sim), 322 tid, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { 323 xpt_free_ccb(ccb); | 322 if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(sim), 323 tid, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { 324 xpt_free_ccb(ccb); |
325 mtx_unlock(&sc->mfi_io_lock); |
|
324 device_printf(sc->mfi_dev, 325 "Cannot create path for bus rescan.\n"); 326 return; 327 } | 326 device_printf(sc->mfi_dev, 327 "Cannot create path for bus rescan.\n"); 328 return; 329 } |
330 mtx_unlock(&sc->mfi_io_lock); |
|
328 329 xpt_rescan(ccb); 330 331 mtx_lock(&sc->mfi_io_lock); 332 camsc->state = MFIP_STATE_NONE; 333 mtx_unlock(&sc->mfi_io_lock); 334} 335 --- 138 unchanged lines hidden --- | 331 332 xpt_rescan(ccb); 333 334 mtx_lock(&sc->mfi_io_lock); 335 camsc->state = MFIP_STATE_NONE; 336 mtx_unlock(&sc->mfi_io_lock); 337} 338 --- 138 unchanged lines hidden --- |