HP-UX Reference (11i v3 07/02) - 7 Device (Special) Files, 9 General Information, Index (vol 10)
s
scsi_ctl(7) scsi_ctl(7)
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 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 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.
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.
The data_xfer field indicates the number of data bytes actually transferred during the data phase of the
cdb command. This field is valid only when the cdb_status field contains one of the following values:
S_GOOD or S_CHECK_CONDITION
. The sense_xfer field indicates the number of valid sense data bytes.
This field is valid only when the cdb_status field contains the value
S_CHECK_CONDITION
and the
sense_status field contains the value
S_GOOD.
The SIOC_ABORT ioctl causes a SCSI ABORT message to be sent to the LUN. This clears all active com-
mands to the LUN from this initiator.
The SIOC_TASK_MGMT ioctl causes a SCSI task management function to be performed if supported by
the SCSI transport. The following task management function values can be specified. They are defined in
<sys/scsi.h> :
SIOC_TM_LUN_RESET
Lun Reset
SIOC_TM_WARM_TGT_RESET
Warm Target Reset
SIOC_TM_COLD_TGT_RESET
Cold Target Reset
The
SIOC_RESET_DEV ioctl causes a SCSI device to be reset (including clearing all active commands).
On parallel SCSI a
PSIOC_RESET_DEV and SIOC_RESET_DEV
ioctls cause a SCSI BUS DEVICE
RESET
message to be sent to the associated target. On Fibre Channel a SIOC_RESET_DEV ioctl causes a
"TARGET RESET" task management function to be sent to the associated target followed by a Global Pro-
cess Logout (GPRLO).
The
SIOC_RESET_BUS ioctl causes the system to generate a SCSI bus reset condition on the associated
bus. A SCSI bus reset condition causes all devices on the bus to be reset (including clearing all active com-
mands on all devices). The SIOC_RESET_BUS ioctl does not apply to Fibre Channel.
Often it is necessary or useful to prohibit other SCSI commands while performing device-control opera-
tions. This should be done by gaining exclusive access via the SIOC_EXCLUSIVE ioctl. The associated
argument points to an integer with one of these values defined in <sys/scsi.h> . Note that if the ioctl
is issued on a persistent device file, target and bus exclusive access requests result to a LUN exclusive
access being performed.
SIOC_REL_LUN_EXCL release exclusive access to logical unit
SIOC_SET_LUN_EXCL obtain exclusive access to logical unit
HP-UX 11i Version 3: February 2007 − 6 − Hewlett-Packard Company 159