SCIOLHALT

This operation stops the current command of the selected device, clears the command queue of any pending commands, and brings the device to a halted state. The adapter sends a SCSI abort message to the device and is usually used by the device driver to abort the current operation instead of waiting for it to complete or time out.

The adapter also performs normal error recovery procedures during this command. The following is a typical call:

rc = fp_ioctl(fp, SCIOLHALT, &sciolst);

where fp is a pointer to a file structure and sciolst is a scsi_sciolst structure (defined in /usr/include/sys/scsi_buf.h) that contains the SCSI ID or iSCSI device's SCSI ID alias, and Logical Unit Number (LUN) ID values of the device to be started.

A nonzero return value indicates an error has occurred. Possible errno values are:

Item Description
EIO An unrecoverable system error has occurred.
EINVAL The device is not opened.
EACCES The adapter is in diagnostics mode.
ETIMEDOUT The operation did not complete before the time-out value was exceeded.
For all transport types, the version field of the scsi_sciolst structure must be set to a minimum value of SCSI_VERSION_1, which is defined in the /usr/include/sys/scsi_buf.h file. In addition, the following fields can be set:
  • world_wide_name - The caller can set the world_wide_name field to the World Wide Name of the attached target device. If Dynamic Tracking of FC devices is enabled, the world_wide_name field must be set to ensure communication with the device because the scsi_id field of a device can change after dynamic tracking events.
  • node_name - The caller can set the node_name field to the Node Name of the attached target device. If the world_wide_name field and the version field are set to SCSI_VERSION_1 but the node_name field is not set, the scsi_id field is used for device lookup instead of the world_wide_name. If Dynamic Tracking of FC devices is enabled, the node_name field must be set to ensure communication with the device because the scsi_id field of a device can change after dynamic tracking events.

This operation requires SCIOLSTART to be run first.

If the FCP SCIOLHALT ioctl operation completes successfully, then the adap_set_flags field might have the SCIOL_RET_ID_ALIAS flag set. This field is set only if the world_wide_name and node_ name fields were provided in the ioctl call and the FC adapter driver detects that the scsi_id field of this device has changed. The scsi_id field contains the new scsi_id value.