HP-UX Reference (11i v3 07/02) - 7 Device (Special) Files, 9 General Information, Index (vol 10)

s
scsi_ctl(7) scsi_ctl(7)
*/
} sioc_bus_parms_t;
struct sioc_bus_limits {
unsigned int flags; /* reserved for future
* use
*/
unsigned int max_width;
unsigned int max_reqack_offset;
unsigned int max_xfer_rate; /* bytes/sec */
unsigned int reserved[4]; /* reserved for future
* use
*/
} sioc_bus_limits_t;
The following is included from <sys/pscsi.h>
:
#define PSIOC_GET_TGT_PARMS _IOWR(’S’, 114, struct sioc_tgt_parms)
#define PSIOC_GET_TGT_LIMITS _IOWR(’S’, 115, struct sioc_tgt_limits)
#define PSIOC_RESET_DEV _IOW(’S’, 116, int)
#define PDIOC_RSTCLR _IOW(’S’, 117, int)
SCSI Commands and Operations
SIOC_IO_EXT and SIOC_IO ioctls allow an arbitrary SCSI command to be sent to a device. All details
of the SCSI command protocol are handled automatically.
SIOC_IO_EXT should only be issued on per-
sistent device files. it allows to send the scsi command through any available LUN path or through a
selected LUN path.
SIOC_IO is deprecated. It can be issued on both persistent and legacy device files.
When issued on a persistent device file, the SCSI command is sent through any available LUN path.
The following flags can be used to specify the flags field value of both
SIOC_IO_EXT and SIOC_IO,
unless indicated otherwise:
SCTL_READ Data read operation is expected if data_length field is non-zero. The
absence of this flag implies that data write operation is expected if the
data_length field is non-zero.
SCTL_INIT_SDTR Synchronous data transfer request negotiations should be attempted with
this command. This flag only applies to parallel SCSI and is maintained for
backward compatibility.
SCTL_INIT_WDTR Wide data transfer request negotiations should be attempted with this com-
mand. This flag only applies to parallel SCSI and is maintained for back-
ward compatibility.
SCTL_NO_DISC discpriv bit in Identify message is not set. This flag only applies to parallel
SCSI and is maintained for backward compatibility.
ESCTL_IO_LPT The SCSI command is to be issued on a given LUN path. This flag can only
be specified with SIOC_IO_EXT ioctl. When specified the hardware path
of the LUN path to use is specified in field lpt_hwp
The cdb field specifies the SCSI command bytes. The number of command bytes is specified by the
cdb_length field. These command bytes are sent to the target device during the SCSI command phase.
The address of the data area for the data phase of the SCSI command is specified by the data field. The
data_length field specifies the maximum number of data bytes to be transferred. A zero-valued data_length
indicates that no data phase should occur. Most SCSI commands with a data phase expect the data length
information to be included somewhere in the command bytes. The caller is responsible for correctly specify-
ing both the data_length field and any cdb data length values. The length may not be larger than
SCSI_MAXPHYS and some implementations further restrict this length.
The max_msecs field specifies the maximum time, in milliseconds, that the device should need to complete
the command. If this period of time expires without command completion, the system might attempt
recovery procedures to regain the device’s attention. These recovery procedures might include abort tag,
abort, and device and bus reset operations. A zero value in the max_msecs field indicates that the timeout
period is infinite and the system should wait indefinitely for command completion.
When the SIO_IO_EXT or SIOC_IO ioctl call returns, all command processing has been completed.
Most SIOC_IO_EXT /SIOC_IO ioctl calls will return zero (success). The resulting detailed ioctl data
158 Hewlett-Packard Company 5 HP-UX 11i Version 3: February 2007