1/*
2 * Implementation of SCSI Processor Target Peripheral driver for CAM.
3 *
4 * Copyright (c) 1998 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 * $FreeBSD: head/sys/cam/scsi/scsi_pt.c 101940 2002-08-15 20:54:03Z njl $
29 */
30
31#include <sys/param.h>
32#include <sys/queue.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/types.h>
36#include <sys/bio.h>
--- 76 unchanged lines hidden (view full) ---
113 TAILQ_HEAD_INITIALIZER(ptdriver.units), /* generation */ 0
114};
115
116PERIPHDRIVER_DECLARE(pt, ptdriver);
117
118#define PT_CDEV_MAJOR 61
119
120static struct cdevsw pt_cdevsw = {
121 /* open */ ptopen,
122 /* close */ ptclose,
123 /* read */ physread,
124 /* write */ physwrite,
125 /* ioctl */ ptioctl,
126 /* poll */ nopoll,
127 /* mmap */ nommap,
128 /* strategy */ ptstrategy,
129 /* name */ "pt",
130 /* maj */ PT_CDEV_MAJOR,
131 /* dump */ nodump,
132 /* psize */ nopsize,
133 /* flags */ 0,
134};
135
136#ifndef SCSI_PT_DEFAULT_TIMEOUT
137#define SCSI_PT_DEFAULT_TIMEOUT 60
138#endif
139
140static int
141ptopen(dev_t dev, int flags, int fmt, struct thread *td)
--- 596 unchanged lines hidden ---
2 * Implementation of SCSI Processor Target Peripheral driver for CAM.
3 *
4 * Copyright (c) 1998 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 * $FreeBSD: head/sys/cam/scsi/scsi_pt.c 101940 2002-08-15 20:54:03Z njl $
29 */
30
31#include <sys/param.h>
32#include <sys/queue.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/types.h>
36#include <sys/bio.h>
--- 76 unchanged lines hidden (view full) ---
113 TAILQ_HEAD_INITIALIZER(ptdriver.units), /* generation */ 0
114};
115
116PERIPHDRIVER_DECLARE(pt, ptdriver);
117
118#define PT_CDEV_MAJOR 61
119
120static struct cdevsw pt_cdevsw = {
121 /* open */ ptopen,
122 /* close */ ptclose,
123 /* read */ physread,
124 /* write */ physwrite,
125 /* ioctl */ ptioctl,
126 /* poll */ nopoll,
127 /* mmap */ nommap,
128 /* strategy */ ptstrategy,
129 /* name */ "pt",
130 /* maj */ PT_CDEV_MAJOR,
131 /* dump */ nodump,
132 /* psize */ nopsize,
133 /* flags */ 0,
134};
135
136#ifndef SCSI_PT_DEFAULT_TIMEOUT
137#define SCSI_PT_DEFAULT_TIMEOUT 60
138#endif
139
140static int
141ptopen(dev_t dev, int flags, int fmt, struct thread *td)
--- 596 unchanged lines hidden ---