diff options
author | ru <ru@FreeBSD.org> | 2002-12-10 14:21:55 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2002-12-10 14:21:55 +0000 |
commit | 90d96c8e326f35147be4822716b0775a3589cc2b (patch) | |
tree | da969ca44124afcc361f190cd303e465e63ab0f5 /share/man/man4/targ.4 | |
parent | 82284b83818297d8a6763593f4e26fbf5df06163 (diff) | |
download | FreeBSD-src-90d96c8e326f35147be4822716b0775a3589cc2b.zip FreeBSD-src-90d96c8e326f35147be4822716b0775a3589cc2b.tar.gz |
mdoc(7) police: overhaul.
Approved by: re
Diffstat (limited to 'share/man/man4/targ.4')
-rw-r--r-- | share/man/man4/targ.4 | 55 |
1 files changed, 33 insertions, 22 deletions
diff --git a/share/man/man4/targ.4 b/share/man/man4/targ.4 index 30bfeff..d2bd3aa 100644 --- a/share/man/man4/targ.4 +++ b/share/man/man4/targ.4 @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd November 15, 2002 -.Dt targ 4 +.Dt TARG 4 .Os .Sh NAME .Nm targ @@ -36,23 +36,25 @@ The .Nm driver provides an interface for usermode programs to emulate SCSI target -devices. A sample program that emulates a disk drive (similar to +devices. +A sample program that emulates a disk drive (similar to .Xr da 4 ) -can be found in /usr/share/examples/scsi_target. +can be found in +.Pa /usr/share/examples/scsi_target . .Pp The .Nm driver supplies control devices, -.Pa /dev/targ0 , -.Pa /dev/targ1 , +.Pa /dev/targ0 , +.Pa /dev/targ1 , etc. If a device is already in use, the open will fail and .Va errno will be set to .Er EBUSY . After opening the device, the file descriptor must be bound to a -specific bus/target/lun and enabled to process CCBs using the -.Pa TARGIOCENABLE +specific bus/target/LUN and enabled to process CCBs using the +.Dv TARGIOCENABLE ioctl. The process then uses .Xr write 2 @@ -60,18 +62,18 @@ to send CCBs to the SIM and .Xr poll 2 or .Xr kqueue 2 -to see if responses are ready. Pointers to completed CCBs are returned via +to see if responses are ready. +Pointers to completed CCBs are returned via .Xr read 2 . Any data transfers requested by the user CCBs are done via zero-copy IO. -.Pp .Sh IOCTLS The following .Xr ioctl 2 calls are defined in the header file .Aq Pa cam/scsi/scsi_targetio.h . -.Bl -tag -width TARGIOCDISABLE +.Bl -tag -width ".Dv TARGIOCDISABLE" .It Dv TARGIOCENABLE -.Pq Li "struct ioc_enable_lun" +.Pq Vt "struct ioc_enable_lun" Enable target mode on the LUN specified by the following structure: .Bd -literal -offset indent struct ioc_enable_lun { @@ -83,27 +85,33 @@ struct ioc_enable_lun { }; .Ed .Pp -The selected path (bus), target, and lun must not already be in use or +The selected path (bus), target, and LUN must not already be in use or .Er EADDRINUSE is returned. -If grp6_len or grp7_len are non-zero, reception of vendor-specific commands +If +.Va grp6_len +or +.Va grp7_len +are non-zero, reception of vendor-specific commands is enabled. .It Dv TARGIOCDISABLE Disable target mode and abort all pending CCBs. -The CCBs may optionally be read as they complete. -.Pa TARGIOCENABLE +The CCBs may optionally be read as they complete. +.Dv TARGIOCENABLE can then be called to activate a different LUN. Multiple disable calls have no effect. The .Xr close 2 system call automatically disables target mode if enabled. .It Dv TARGIOCDEBUG -.Pq Li "int" -Enables CAM_PERIPH debugging if the argument is non-zero, otherwise disables +.Pq Vt int +Enables +.Dv CAM_PERIPH +debugging if the argument is non-zero, otherwise disables it. .El .Sh FILES -.Bl -tag -width /sys/cam/scsi/scsi_target.c -compact +.Bl -tag -width ".Pa /sys/cam/scsi/scsi_target.c" -compact .It Aq Pa cam/scsi/scsi_targetio.h describes the usermode interface. .It Pa /sys/cam/scsi/scsi_target.c @@ -112,7 +120,7 @@ is the driver source file. are the control devices. .El .Sh SEE ALSO -.Xr /usr/share/examples/scsi_target , +.Pa /usr/share/examples/scsi_target , .Xr scsi 4 .Rs .%T "FreeBSD Target Information" @@ -121,7 +129,8 @@ are the control devices. .Sh BUGS Currently, only the .Xr ahc 4 -driver fully supports target mode. The +driver fully supports target mode. +The .Xr isp 4 and .Xr sym 4 @@ -131,13 +140,15 @@ The .Xr ahc 4 driver does not support tagged queuing in target mode. .Sh AUTHORS +.An -nosplit The .Nm driver first appeared in -.Fx 3.0 and was written by +.Fx 3.0 +and was written by .An Justin T. Gibbs . It was rewritten for -.Fx 5.0 +.Fx 5.0 by .An Nate Lawson Aq nate@root.org . |