HP-UX Reference (11i v1 00/12) - 5 Miscellaneous Topics, 7 Device (Special) Files, 9 General Information, Index (vol 9)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man7/!!!intro.7
________________________________________________________________
___ ___
s
scsi_ctl(7) scsi_ctl(7)
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 ag 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 parallelSCSI.
SCTL_INIT_WDTR
wide data transfer request negotiations should be attempted with this
command. This flag only applies to parallelSCSI.
SCTL_NO_DISC discpriv bit in Identify message is not set. This flag only applies to
parallelSCSI.
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 eld 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 interface
(the device does not exist or does not respond).
SCTL_INCOMPLETE The device answered selection but the command is not completed (the dev-
ice 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).
Section 7118 4 HP-UX Release 11i: December 2000
___
___