HP-UX Reference (11i v2 04/09) - 7 Device (Special) Files, 9 General Information, Index (vol 10)
s
scsi_ctl(7) scsi_ctl(7)
At power-up and after being reset, all parallel
SCSI devices and hosts communicate using eight-bit data
transfers. A
SCSI target and host pair may agree to use sixteen-bit (wide) data transfers to increase
I/O
performance. To make use of wide data transfers, a
SCSI target and host must negotiate to determine a
mutually acceptable data transfer width parameter. A
SCSI
wide data transfer request (WDTR) message,
used to initiate the negotiation process, is associated with the processing of a
SCSI command.
Some
SCSI devices are able to simultaneously manage multiple active commands. Such a device has a
command queue that holds commands for processing. Command queuing can improve
I/O performance by
reducing the time spent by the device waiting for new commands from the host. Note that command
queuing might not improve
I/O performance substantially for devices that support ‘‘read-ahead’’ and
‘‘immediate-reporting’’ (see scsi_disk (7) and scsi_tape (7)). The
SCSI device and host use command tags to
correctly manage these multiple simultaneously active commands. At all times when command queuing
is in effect, each active command being handled by a specific
LUN has a unique command tag.
SCSI devices indicate their ability to support the special communication features described above in their
SCSI INQUIRY command data. Normally the SCSI INQUIRY
command data and negotiation protocols
allow hosts and devices to determine the optimal communication parameters so that I/O
performance is
maximized. The current operating communication parameters may be determined by use of the:
SIOC_GET_LUN_PARMS
, SIOC_GET_TGT_PARMS
, and SIOC_GET_BUS_PARMS
ioctls.
Occasionally, it is desirable to limit
SCSI communication parameters to work around a communication
problem or to provide external insight in determining optimal parameters.
SCSI communication parame-
ter limit suggestions can be specified by use of the: SIOC_SET_LUN_LIMITS
,
SIOC_SET_TGT_LIMITS
, and SIOC_SET_BUS_LIMITS ioctls. Note that there might be substantial
differences between specified communication parameter limit suggestions and the corresponding actual
current communication parameters being used for communication. These differences are a result of
device-specific driver capabilities, interface driver capabilities, interface hardware capabilities, device
capabilities, delays due to the negotiation process, delays due to currently active commands, and delays
due to commands waiting to be sent to devices. Note that communication parameter limit suggestions
might not survive between
close() and open() calls, when no SCSI device drivers (device-specific or
scsi_ctl) have associated LUN(s) open.
The current
SCSI communication parameter limit suggestions may be determined by use of the
SIOC_GET_LUN_LIMITS
, SIOC_GET_TGT_LIMITS, and SIOC_GET_BUS_LIMITS
ioctls.
Logical unit communication parameters may be managed by use of the
SIOC_GET_LUN_PARMS,
SIOC_SET_LUN_LIMITS
, and SIOC_GET_LUN_LIMITS ioctls.
The
SIOC_GET_LUN_PARMS
ioctl indicates the current LUN communication parameter values. The
max_q_depth field indicates whether or not tagged queuing is enabled, and if enabled, the maximum
number of simultaneously active commands allowed. When
max_q_depth is zero, tagged queuing is
disabled. When it is one, tags are being used but commands are still being serially processed. When it is
greater than one, tags are being used and
max_q_depth specifies the maximum number of simultane-
ously active commands allowed.
The
SIOC_SET_LUN_LIMITS
ioctl may be used to provide LUN communication parameter limit sugges-
tions. The
max_q_depth field indicates whether or not tagged queuing should be enabled, and if
enabled, the maximum number of simultaneously active commands that should be allowed. The
SIOC_GET_LUN_LIMITS ioctl indicates the current LUN communication parameter limit suggestions.
Target communication parameters may be managed by use of the
SIOC_GET_TGT_PARMS
,
SIOC_SET_TGT_LIMITS, and SIOC_GET_TGT_LIMITS
ioctls to any associated LUN.
The SIOC_GET_TGT_PARMS ioctl indicates the current target communication parameter values. The
width, reqack_offset, and xfer_rate fields indicate the currently negotiated data transfer
parameters. When width is eight, narrow transfers are in effect. When it is sixteen, wide transfers are
in effect. When reqack_offset is zero, asynchronous transfers are in effect and xfer_rate is mean-
ingless. When
reqack_offset is non-zero, synchronous transfers are in effect and the maximum
‘‘burst’’ data transfer rate is xfer_rate words per second, where the size of a word is as indicated in
width.
The
SIOC_SET_TGT_LIMITS ioctl specifies the target communication parameter limit suggestions. The
max_width field specifies maximum bus width that should be used for data transfers. The
max_reqack_offset field specifies the maximum number of outstanding REQs that should be
attempted during data transfers. The max_xfer_rate field specifies the maximum ‘‘burst’’ data rate
that should be allowed during synchronous data transfers. The SIOC_GET_TGT_LIMITS ioctl indicates
the current target communication parameter limit suggestions. The width, reqack_offset,
HP-UX 11i Version 2: September 2004 − 2 − Hewlett-Packard Company Section 7−−135