Deleted Added
full compact
isc_cam.c (211095) isc_cam.c (249468)
1/*-
2 * Copyright (c) 2005-2010 Daniel Braniss <danny@cs.huji.ac.il>
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

--- 14 unchanged lines hidden (view full) ---

23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 */
27/*
28 | $Id: isc_cam.c 998 2009-12-20 10:32:45Z danny $
29 */
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2005-2010 Daniel Braniss <danny@cs.huji.ac.il>
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

--- 14 unchanged lines hidden (view full) ---

23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 */
27/*
28 | $Id: isc_cam.c 998 2009-12-20 10:32:45Z danny $
29 */
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/iscsi/initiator/isc_cam.c 211095 2010-08-09 12:36:36Z des $");
31__FBSDID("$FreeBSD: head/sys/dev/iscsi/initiator/isc_cam.c 249468 2013-04-14 09:55:48Z mav $");
32
33#include "opt_iscsi_initiator.h"
34
35#include <sys/param.h>
36#include <sys/kernel.h>
37#include <sys/callout.h>
38#if __FreeBSD_version >= 700000
39#include <sys/lock.h>

--- 105 unchanged lines hidden (view full) ---

145 xdebug("scan failed (can't allocate CCB)");
146 return ENOMEM; // XXX
147 }
148
149 sp->flags &= ~ISC_CAMDEVS;
150 sp->flags |= ISC_SCANWAIT;
151
152 CAM_LOCK(sp);
32
33#include "opt_iscsi_initiator.h"
34
35#include <sys/param.h>
36#include <sys/kernel.h>
37#include <sys/callout.h>
38#if __FreeBSD_version >= 700000
39#include <sys/lock.h>

--- 105 unchanged lines hidden (view full) ---

145 xdebug("scan failed (can't allocate CCB)");
146 return ENOMEM; // XXX
147 }
148
149 sp->flags &= ~ISC_CAMDEVS;
150 sp->flags |= ISC_SCANWAIT;
151
152 CAM_LOCK(sp);
153 if(xpt_create_path(&sp->cam_path, xpt_periph, cam_sim_path(sp->cam_sim),
153 if(xpt_create_path(&sp->cam_path, NULL, cam_sim_path(sp->cam_sim),
154 0, CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
155 xdebug("can't create cam path");
156 CAM_UNLOCK(sp);
157 free(ccb, M_TEMP);
158 return ENODEV; // XXX
159 }
160 xpt_setup_ccb(&ccb->ccb_h, sp->cam_path, 5/*priority (low)*/);
161 ccb->ccb_h.func_code = XPT_SCAN_BUS;

--- 223 unchanged lines hidden ---
154 0, CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
155 xdebug("can't create cam path");
156 CAM_UNLOCK(sp);
157 free(ccb, M_TEMP);
158 return ENODEV; // XXX
159 }
160 xpt_setup_ccb(&ccb->ccb_h, sp->cam_path, 5/*priority (low)*/);
161 ccb->ccb_h.func_code = XPT_SCAN_BUS;

--- 223 unchanged lines hidden ---