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

s
scsi_ctl(7) scsi_ctl(7)
unsigned int max_reqack_offset;
unsigned int max_xfer_rate; /* bytes/sec */
unsigned int reserved[4]; /* reserved for future use */
};
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 */
};
SCSI Commands and Operations
The SIOC_IO ioctl allows an arbitrary SCSI command to be sent to a device. All details of the SCSI com-
mand protocol are handled automatically.
The following flags can be used to specify the
flags field value:
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.
SCTL_INIT_SDTR
Synchronous data transfer request negotiations should be attempted with this
command. This flag only applies to parallel SCSI.
SCTL_INIT_WDTR
Wide data transfer request negotiations should be attempted with this command.
This flag only applies to parallel SCSI.
SCTL_NO_DISC discpriv bit in Identify message is not set. This flag only applies to parallel
SCSI.
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 com-
plete the command. If this period of time expires without command completion, the system might attempt
recovery procedures to regain the devices 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 ioctl call returns, all command processing has been completed. Most SIOC_IO ioctl
calls will return zero (success). The resulting detailed ioctl data should be used to evaluate "success" or
"failure" from the caller’s 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 associated 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 inter-
face (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.
HP-UX 11i Version 2: December 2007 Update 4 Hewlett-Packard Company 153