1998-10-12 00:26:03 +00:00
|
|
|
.\"
|
1999-05-08 21:28:18 +00:00
|
|
|
.\" Copyright (c) 1998, 1999 Kenneth D. Merry.
|
1998-10-12 00:26:03 +00:00
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. The name of the author may not be used to endorse or promote products
|
|
|
|
.\" derived from this software without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
1999-08-28 00:22:10 +00:00
|
|
|
.\" $FreeBSD$
|
1998-10-12 00:26:03 +00:00
|
|
|
.\"
|
|
|
|
.Dd October 10, 1998
|
|
|
|
.Dt PASS 4
|
2000-12-14 11:52:05 +00:00
|
|
|
.Os FreeBSD
|
1998-10-12 00:26:03 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm pass
|
|
|
|
.Nd CAM application passthrough driver
|
|
|
|
.Sh SYNOPSIS
|
2000-01-23 15:04:20 +00:00
|
|
|
.Cd device pass
|
1999-05-08 21:28:18 +00:00
|
|
|
.Cd device pass2 at scbus0 target 3 unit 0
|
1998-10-12 00:26:03 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
2000-11-20 18:41:33 +00:00
|
|
|
.Nm
|
1998-10-12 00:26:03 +00:00
|
|
|
driver provides a way for userland applications to issue CAM CCBs to the
|
|
|
|
kernel.
|
|
|
|
.Pp
|
|
|
|
Since the
|
2000-11-20 18:41:33 +00:00
|
|
|
.Nm
|
1998-10-12 00:26:03 +00:00
|
|
|
driver allows direct access to the CAM subsystem, system administrators
|
|
|
|
should exercise caution when granting access to this driver. If used
|
|
|
|
improperly, this driver can allow userland applications to crash a machine
|
|
|
|
or cause data loss.
|
|
|
|
.Pp
|
|
|
|
The
|
2000-11-20 18:41:33 +00:00
|
|
|
.Nm
|
1998-10-12 00:26:03 +00:00
|
|
|
driver attaches to every
|
|
|
|
.Tn SCSI
|
|
|
|
device found in the system.
|
|
|
|
Since it attaches to every device, it provides a generic means of accessing
|
|
|
|
.Tn SCSI
|
|
|
|
devices, and allows the user to access devices which have no
|
|
|
|
"standard" peripheral driver associated with them.
|
|
|
|
.Sh KERNEL CONFIGURATION
|
|
|
|
It is only necessary to configure one
|
2000-11-20 18:41:33 +00:00
|
|
|
.Nm
|
1998-10-12 00:26:03 +00:00
|
|
|
device in the kernel;
|
2000-11-20 18:41:33 +00:00
|
|
|
.Nm
|
1998-10-12 00:26:03 +00:00
|
|
|
devices are automatically allocated as
|
|
|
|
.Tn SCSI
|
|
|
|
devices are found.
|
|
|
|
.Sh IOCTLS
|
|
|
|
.Bl -tag -width 012345678901234
|
|
|
|
.It CAMIOCOMMAND
|
1999-05-08 21:28:18 +00:00
|
|
|
This ioctl takes most kinds of CAM CCBs and passes them through to the CAM
|
|
|
|
transport layer for action. Note that some CCB types are not allowed
|
|
|
|
through the passthrough device, and must be sent through the
|
|
|
|
.Xr xpt 4
|
|
|
|
device instead. Some examples of xpt-only CCBs are XPT_SCAN_BUS,
|
|
|
|
XPT_DEV_MATCH, XPT_RESET_BUS, XPT_SCAN_LUN, XPT_ENG_INQ, and XPT_ENG_EXEC.
|
|
|
|
These CCB types have various attributes that make it illogical or
|
|
|
|
impossible to service them through the passthrough interface.
|
1998-10-12 00:26:03 +00:00
|
|
|
.It CAMGETPASSTHRU
|
|
|
|
This ioctl takes an XPT_GDEVLIST CCB, and returns the passthrough device
|
|
|
|
corresponding to the device in question. Although this ioctl is available
|
|
|
|
through the
|
2000-11-20 18:41:33 +00:00
|
|
|
.Nm
|
1998-10-12 00:26:03 +00:00
|
|
|
driver, it is of limited use, since the caller must already know that
|
|
|
|
the device in question is a passthrough device if they're issuing this
|
|
|
|
ioctl. It is probably more useful to issue this ioctl through the
|
|
|
|
.Xr xpt 4
|
|
|
|
device.
|
|
|
|
.El
|
|
|
|
.Sh FILES
|
2000-12-29 09:18:45 +00:00
|
|
|
.Bl -tag -width /dev/passn -compact
|
1998-10-12 00:26:03 +00:00
|
|
|
.It Pa /dev/pass Ns Ar n
|
|
|
|
Character device nodes for the
|
2000-11-20 18:41:33 +00:00
|
|
|
.Nm
|
1998-10-12 00:26:03 +00:00
|
|
|
driver. There should be one of these for each device accessed through the
|
|
|
|
CAM subsystem.
|
|
|
|
.El
|
|
|
|
.Sh DIAGNOSTICS
|
|
|
|
None.
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr cam 3 ,
|
1998-10-16 00:26:28 +00:00
|
|
|
.Xr cam_cdbparse 3 ,
|
1998-10-12 00:26:03 +00:00
|
|
|
.Xr xpt 4 ,
|
1998-10-16 00:26:28 +00:00
|
|
|
.Xr camcontrol 8
|
1998-10-12 00:26:03 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The CAM passthrough driver first appeared in
|
|
|
|
.Fx 3.0 .
|
|
|
|
.Sh AUTHORS
|
|
|
|
.An Kenneth Merry Aq ken@FreeBSD.ORG
|
|
|
|
.Sh BUGS
|
|
|
|
It might be nice to have a way to asynchronously send CCBs through the
|
|
|
|
passthrough driver. This would probably require some sort of read/write
|
|
|
|
interface or an asynchronous ioctl interface.
|