Deleted Added
full compact
scsi_target.c (111579) scsi_target.c (111815)
1/*
2 * Generic SCSI Target Kernel Mode Driver
3 *
4 * Copyright (c) 2002 Nate Lawson.
5 * Copyright (c) 1998, 1999, 2001, 2002 Justin T. Gibbs.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

21 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*
2 * Generic SCSI Target Kernel Mode Driver
3 *
4 * Copyright (c) 2002 Nate Lawson.
5 * Copyright (c) 1998, 1999, 2001, 2002 Justin T. Gibbs.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

21 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/cam/scsi/scsi_target.c 111571 2003-02-26 20:53:28Z phk $
29 * $FreeBSD: head/sys/cam/scsi/scsi_target.c 111815 2003-03-03 12:15:54Z phk $
30 */
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/conf.h>
36#include <sys/malloc.h>
37#include <sys/poll.h>

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

100static d_kqfilter_t targkqfilter;
101static void targreadfiltdetach(struct knote *kn);
102static int targreadfilt(struct knote *kn, long hint);
103static struct filterops targread_filtops =
104 { 1, NULL, targreadfiltdetach, targreadfilt };
105
106#define TARG_CDEV_MAJOR 65
107static struct cdevsw targ_cdevsw = {
30 */
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/conf.h>
36#include <sys/malloc.h>
37#include <sys/poll.h>

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

100static d_kqfilter_t targkqfilter;
101static void targreadfiltdetach(struct knote *kn);
102static int targreadfilt(struct knote *kn, long hint);
103static struct filterops targread_filtops =
104 { 1, NULL, targreadfiltdetach, targreadfilt };
105
106#define TARG_CDEV_MAJOR 65
107static struct cdevsw targ_cdevsw = {
108 /* open */ targopen,
109 /* close */ targclose,
110 /* read */ targread,
111 /* write */ targwrite,
112 /* ioctl */ targioctl,
113 /* poll */ targpoll,
114 /* mmap */ nommap,
115 /* strategy */ nostrategy,
116 /* name */ "targ",
117 /* maj */ TARG_CDEV_MAJOR,
118 /* dump */ nodump,
119 /* psize */ nopsize,
120 /* flags */ D_KQFILTER,
121 /* kqfilter */ targkqfilter
108 .d_open = targopen,
109 .d_close = targclose,
110 .d_read = targread,
111 .d_write = targwrite,
112 .d_ioctl = targioctl,
113 .d_poll = targpoll,
114 .d_name = "targ",
115 .d_maj = TARG_CDEV_MAJOR,
116 .d_flags = D_KQFILTER,
117 .d_kqfilter = targkqfilter
122};
123
124static cam_status targendislun(struct cam_path *path, int enable,
125 int grp6_len, int grp7_len);
126static cam_status targenable(struct targ_softc *softc,
127 struct cam_path *path,
128 int grp6_len, int grp7_len);
129static cam_status targdisable(struct targ_softc *softc);

--- 1066 unchanged lines hidden ---
118};
119
120static cam_status targendislun(struct cam_path *path, int enable,
121 int grp6_len, int grp7_len);
122static cam_status targenable(struct targ_softc *softc,
123 struct cam_path *path,
124 int grp6_len, int grp7_len);
125static cam_status targdisable(struct targ_softc *softc);

--- 1066 unchanged lines hidden ---