scsi_target.c (47413) | scsi_target.c (47625) |
---|---|
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.11 1999/05/07 07:03:03 phk Exp $ | 28 * $Id: scsi_target.c,v 1.12 1999/05/22 22:00:24 gibbs 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> --- 94 unchanged lines hidden (view full) --- 131static d_read_t targread; 132static d_write_t targwrite; 133static d_ioctl_t targioctl; 134static d_poll_t targpoll; 135static d_strategy_t targstrategy; 136 137#define TARG_CDEV_MAJOR 65 138static struct cdevsw targ_cdevsw = { | 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> --- 94 unchanged lines hidden (view full) --- 131static d_read_t targread; 132static d_write_t targwrite; 133static d_ioctl_t targioctl; 134static d_poll_t targpoll; 135static d_strategy_t targstrategy; 136 137#define TARG_CDEV_MAJOR 65 138static struct cdevsw targ_cdevsw = { |
139 /*d_open*/ targopen, 140 /*d_close*/ targclose, 141 /*d_read*/ targread, 142 /*d_write*/ targwrite, 143 /*d_ioctl*/ targioctl, 144 /*d_stop*/ nostop, 145 /*d_reset*/ noreset, 146 /*d_devtotty*/ nodevtotty, 147 /*d_poll*/ targpoll, 148 /*d_mmap*/ nommap, 149 /*d_strategy*/ targstrategy, 150 /*d_name*/ "targ", 151 /*d_spare*/ NULL, 152 /*d_maj*/ -1, 153 /*d_dump*/ nodump, 154 /*d_psize*/ nopsize, 155 /*d_flags*/ 0, 156 /*d_maxio*/ 0, 157 /*b_maj*/ -1 | 139 /* open */ targopen, 140 /* close */ targclose, 141 /* read */ targread, 142 /* write */ targwrite, 143 /* ioctl */ targioctl, 144 /* stop */ nostop, 145 /* reset */ noreset, 146 /* devtotty */ nodevtotty, 147 /* poll */ targpoll, 148 /* mmap */ nommap, 149 /* strategy */ targstrategy, 150 /* name */ "targ", 151 /* parms */ noparms, 152 /* maj */ TARG_CDEV_MAJOR, 153 /* dump */ nodump, 154 /* psize */ nopsize, 155 /* flags */ 0, 156 /* maxio */ 0, 157 /* bmaj */ -1 |
158}; 159 160static int targsendccb(struct cam_periph *periph, union ccb *ccb, 161 union ccb *inccb); 162static periph_init_t targinit; 163static void targasync(void *callback_arg, u_int32_t code, 164 struct cam_path *path, void *arg); 165static int targallocinstance(struct ioc_alloc_unit *alloc_unit); --- 1568 unchanged lines hidden --- | 158}; 159 160static int targsendccb(struct cam_periph *periph, union ccb *ccb, 161 union ccb *inccb); 162static periph_init_t targinit; 163static void targasync(void *callback_arg, u_int32_t code, 164 struct cam_path *path, void *arg); 165static int targallocinstance(struct ioc_alloc_unit *alloc_unit); --- 1568 unchanged lines hidden --- |