scsi_ctl.7 (2010 09)

s
scsi_ctl(7) scsi_ctl(7)
NAME
scsi_ctl - SCSI pass-through driver (esctl/sctl)
DESCRIPTION
SCSI devices are controlled by a device-specific driver, when one exists. Device-specific drivers, such as
those for SCSI direct access (disk) and sequential access (tape) devices, coordinate device and driver
states to accomplish correct logical device behavior. The SCSI pass-through driver enables use of SCSI
devices and commands not normally supported by these device-specific drivers.
esctl is the SCSI pass-through driver and works with persistent device files (see intro (7)).
sctl is the
SCSI pass-through driver already used on HP-UX releases prior to HP-UX 11i v3. It is maintained here
for backward compatibility, and works with legacy device files. In this document
scsi_ctl refers to
both
esctl and sctl.
Once the device is opened through
scsi_ctl driver, ioctl calls can be used to change SCSI communica-
tion parameters or to attempt SCSI commands and other SCSI operations. Since the pass-through driver
does not attempt to logically understand the target device,
read() and write() calls are not sup-
ported.
Except where noted, the ioctls described here are available through all SCSI device drivers (including
device-specific drivers). All
reserved fields in the data structures associated with these ioctls must be
zero-filled.
The following ioctls which are specific to parallel SCSI, are deprecated for issuance on LUN device special
files (DSF). They are not supported on persistent device special files. They continue to be supported on
legacy device special files for backward compatibility. However, HP now recommends to issue these ioctls
(or equivalent ioctls introduced with HP-UX 11i v3) directly on the parallel SCSI HBA device special file
(DSF).
SIOC_GET_TGT_PARMS
SIOC_GET_BUS_PARMS
SIOC_GET_TGT_LIMITS
SIOC_GET_BUS_LIMITS
SIOC_SET_TGT_LIMITS
SIOC_SET_BUS_LIMITS
The following parallel SCSI specific ioctls introduced with HP-UX 11i v3 should be issued directly on the
parallel SCSI HBA DSF. These ioctls replace some existing ioctls, which can no longer be issued on LUN
persistent device files starting with HP-UX 11i v3:
PSIOC_GET_TGT_LIMITS
replaces SIOC_GET_TGT_PARMS
PSIOC_GET_TGT_PARMS
replaccs SIOC_GET_BUS_PARMS
PDIOC_RSTCLR replaces DIOC_RSTCLR
PSIOC_RESET_DEV replaces
SIOC_RESET_DEV
Legacy device files are deprecated with HP-UX release 11i v3. They are maintained for backward compa-
tibility, and may be obsolete in a future release (see intro (7) for details about legacy device files and per-
sistent device files). It is recommended to use persistent device files for new applications.
Most of the ioctls described here can be issued either on persistent device files or legacy device files. The
behavior of some ioctls may differ depending on whether they are issued on persistent or legacy device
files, and whether multi-pathing is enabled on legacy device files. Typically ioctls issuing SCSI commands
to a device may use any available LUN path to the device to send the commands. However, when multi-
pathing is disabled on legacy device files (see the
leg_mpath_enable attribute in scsimgr (1M)), the
ioctl only attempts to use the LUN path corresponding to the legacy device file. If this LUN path is not
available, the ioctl will fail even if there are other LUN paths available. This behavior corresponds to the
legacy behavior.
Device Special File Minor Number
The pass-through driver (
esctl/sctl) is the preferred method to perform the ioctls SIOC_IO_EXT
(esctl only) and SIOC_IO ioctls, rather than going through a device-specific driver (such as esdisk).
To do this, you must create the device special file for the pass-through driver. mksf (1M) is the recom-
mended method to create a pass-through device file for esctl. To create a device file for the legacy
pass-through driver sctl, use mknod(1M), substituting the values in the minor number as noted:
/usr/sbin/mknod name c 203 0xiitl 0o
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (10 pages)