scsi_target.c (47625) | scsi_target.c (47640) |
---|---|
1/* 2 * Implementation of a simple Target Mode SCSI Proccessor Target driver for CAM. 3 * 4 * Copyright (c) 1998, 1999 Justin T. Gibbs. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * | 1/* 2 * Implementation of a simple Target Mode SCSI Proccessor Target driver for CAM. 3 * 4 * Copyright (c) 1998, 1999 Justin T. Gibbs. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * |
28 * $Id: scsi_target.c,v 1.12 1999/05/22 22:00:24 gibbs Exp $ | 28 * $Id: scsi_target.c,v 1.13 1999/05/30 16:51:07 phk Exp $ |
29 */ 30#include <stddef.h> /* For offsetof */ 31 32#include <sys/param.h> 33#include <sys/queue.h> 34#include <sys/systm.h> 35#include <sys/kernel.h> 36#include <sys/types.h> --- 154 unchanged lines hidden (view full) --- 191 192DATA_SET(periphdriver_set, targdriver); 193 194static struct extend_array *targperiphs; 195 196static void 197targinit(void) 198{ | 29 */ 30#include <stddef.h> /* For offsetof */ 31 32#include <sys/param.h> 33#include <sys/queue.h> 34#include <sys/systm.h> 35#include <sys/kernel.h> 36#include <sys/types.h> --- 154 unchanged lines hidden (view full) --- 191 192DATA_SET(periphdriver_set, targdriver); 193 194static struct extend_array *targperiphs; 195 196static void 197targinit(void) 198{ |
199 dev_t dev; | |
200 201 /* 202 * Create our extend array for storing the devices we attach to. 203 */ 204 targperiphs = cam_extend_new(); 205 if (targperiphs == NULL) { 206 printf("targ: Failed to alloc extend array!\n"); 207 return; 208 } 209 210 /* If we were successfull, register our devsw */ | 199 200 /* 201 * Create our extend array for storing the devices we attach to. 202 */ 203 targperiphs = cam_extend_new(); 204 if (targperiphs == NULL) { 205 printf("targ: Failed to alloc extend array!\n"); 206 return; 207 } 208 209 /* If we were successfull, register our devsw */ |
211 dev = makedev(TARG_CDEV_MAJOR, 0); 212 cdevsw_add(&dev,&targ_cdevsw, NULL); | 210 cdevsw_add(&targ_cdevsw); |
213} 214 215static void 216targasync(void *callback_arg, u_int32_t code, 217 struct cam_path *path, void *arg) 218{ 219 struct cam_periph *periph; 220 --- 1513 unchanged lines hidden --- | 211} 212 213static void 214targasync(void *callback_arg, u_int32_t code, 215 struct cam_path *path, void *arg) 216{ 217 struct cam_periph *periph; 218 --- 1513 unchanged lines hidden --- |