Deleted Added
full compact
targ.4 (202386) targ.4 (228481)
1.\" Copyright (c) 2002
2.\" Nate Lawson. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

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

17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
1.\" Copyright (c) 2002
2.\" Nate Lawson. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

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

17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD: head/share/man/man4/targ.4 202386 2010-01-15 16:01:22Z ru $
25.\" $FreeBSD: head/share/man/man4/targ.4 228481 2011-12-13 21:26:33Z ed $
26.\"
26.\"
27.Dd November 15, 2002
27.Dd December 13, 2011
28.Dt TARG 4
29.Os
30.Sh NAME
31.Nm targ
32.Nd SCSI target emulator driver
33.Sh SYNOPSIS
34To compile this driver into the kernel,
35place the following line in your

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

44devices.
45A sample program that emulates a disk drive (similar to
46.Xr da 4 )
47can be found in
48.Pa /usr/share/examples/scsi_target .
49.Pp
50The
51.Nm
28.Dt TARG 4
29.Os
30.Sh NAME
31.Nm targ
32.Nd SCSI target emulator driver
33.Sh SYNOPSIS
34To compile this driver into the kernel,
35place the following line in your

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

44devices.
45A sample program that emulates a disk drive (similar to
46.Xr da 4 )
47can be found in
48.Pa /usr/share/examples/scsi_target .
49.Pp
50The
51.Nm
52driver supplies control devices,
53.Pa /dev/targ0 ,
54.Pa /dev/targ1 ,
55etc.
56If a device is already in use,
57.Xr open 2
58will fail and
59.Va errno
60will be set to
61.Er EBUSY .
52driver supplies the control device
53.Pa /dev/targ .
62After opening the device, the file descriptor must be bound to a
63specific bus/target/LUN and enabled to process CCBs using the
64.Dv TARGIOCENABLE
65ioctl.
66The process then uses
67.Xr write 2
68to send CCBs to the SIM and
69.Xr poll 2

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

118it.
119.El
120.Sh FILES
121.Bl -tag -width ".Pa /sys/cam/scsi/scsi_target.c" -compact
122.It In cam/scsi/scsi_targetio.h
123describes the usermode interface.
124.It Pa /sys/cam/scsi/scsi_target.c
125is the driver source file.
54After opening the device, the file descriptor must be bound to a
55specific bus/target/LUN and enabled to process CCBs using the
56.Dv TARGIOCENABLE
57ioctl.
58The process then uses
59.Xr write 2
60to send CCBs to the SIM and
61.Xr poll 2

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

110it.
111.El
112.Sh FILES
113.Bl -tag -width ".Pa /sys/cam/scsi/scsi_target.c" -compact
114.It In cam/scsi/scsi_targetio.h
115describes the usermode interface.
116.It Pa /sys/cam/scsi/scsi_target.c
117is the driver source file.
126.It Pa /dev/targ*
127are the control devices.
118.It Pa /dev/targ
119is the control device.
128.El
129.Sh SEE ALSO
130.Pa /usr/share/examples/scsi_target ,
131.Xr ahc 4 ,
132.Xr isp 4 ,
133.Xr scsi 4
134.Rs
135.%T "FreeBSD Target Information"

--- 25 unchanged lines hidden ---
120.El
121.Sh SEE ALSO
122.Pa /usr/share/examples/scsi_target ,
123.Xr ahc 4 ,
124.Xr isp 4 ,
125.Xr scsi 4
126.Rs
127.%T "FreeBSD Target Information"

--- 25 unchanged lines hidden ---