sioc_io.7 (2010 09)

s
sioc_io(7) sioc_io(7)
unsigned sense_status;
unsigned char sense_xfer;
unsigned char reserved[64];
} sctl_io_t;
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-in phase expected if the data_length field is non-zero. The absence of
this flag implies that a data-out phase is expected if the data_length field is
non-zero.
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 specifying 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_msec field indicates that the timeout
period is infinite and the system should wait indefinitely for command completion.
When the
SIOC_IO_EXT/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 should
be used to evaluate "success" or "failure" from the callers perspective. The
cdb_status field indicates
the results of the
cdb command. If the cdb_status field indicates a S_CHECK_CONDITION
status, the
sense_status field indicates the results of the SCSI
REQUEST SENSE command used to collect the associ-
ated sense data. These status fields will contain one of the following values:
SCTL_INVALID_REQUEST
The SCSI command request is invalid and thus not attempted.
SCTL_SELECT_TIMEOUT
The target device does not answer to selection by the host SCSI interface
(the device does not exist or does not respond).
SCTL_INCOMPLETE The device answered selection but the command is not completed (the
device took too long or a communication failure occurred).
S_GOOD Device successfully completed the command.
S_CHECK_CONDITION Device indicated sense data is available.
S_CONDITION_MET Device successfully completed the command and the requested (search or
pre-fetch) operation is satisfied.
S_BUSY Device indicated it is unable to accept the command because it is busy
doing other operations.
S_INTERMEDIATE Device successfully completed this command, which is one in a series of
linked commands (not supported, see WARNINGS ).
S_I_CONDITION_MET Device indicated both S_INTERMEDIATE and S_CONDITION_MET (not
supported, see WARNINGS ).
S_RESV_CONFLICT Device indicated the command conflicted with an existing reservation.
S_COMMAND_TERMINATED Device indicated the command is terminated early by the host system.
S_QUEUE_FULL Device indicated it is unable to accept the command because its com-
mand queue is currently full.
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010