[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 2

SCIOHALT (Halt) SCSI Adapter Device Driver ioctl Operation

Purpose

Ends the current command (if there is one), clears the queue of any pending commands, and places the device queue in a halted state.

Description

The SCIOHALT operation allows the caller to end the current command (if there is one) to a selected device, clear the queue of any pending commands, and place the device queue in a halted state. The command causes the attached SCSI adapter to execute a SCSI abort message to the selected target device. This command is used by an upper-level SCSI device driver to end a running operation instead of waiting for the operation to complete or time out.

Once the SCIOHALT operation is sent, the calling device driver must set the SC_RESUME flag. This bit is located in the flags field of the next sc_buf structure to be processed by the SCSI adapter device driver. Any sc_buf structure sent without the SC_RESUME flag, after the device queue is in the halted state, is rejected.

The arg parameter to the SCIOHALT operation allows the caller to specify the SCSI identifier of the device to be reset. The least significant byte in the arg parameter is the LUN ID (logical unit number identifier) of the LUN on the SCSI controller to be halted. The next least significant byte is the SCSI ID. The remaining two bytes are reserved and must be set to a value of 0.

The SCSI adapter device driver performs normal error-recovery procedures during execution of this command. For example, if the abort message causes the SCSI bus to hang, a SCSI bus reset is initiated to clear the condition.

Return Values

When completed successfully, this operation returns a value of 0. Otherwise, a value of -1 is returned, and the errno global variable is set to one of the following values:

EINVAL Indicates a SCIOSTART operation was not issued prior to this operation.
EIO Indicates an unrecoverable I/O error occurred. In this case, the adapter error-status information is logged in the system error log.
EIO Indicates either the device is already stopping or the device driver was unable to pin code.
ENOCONNECT Indicates a SCSI bus fault occurred.
ENODEV Indicates the target SCSI ID could not be selected or is not responding. This condition is not necessarily an error and is not logged.
ENOMEM Indicates insufficient memory is available to complete the command.
ETIMEDOUT Indicates the adapter did not respond with status before the internal command time-out value expired. This error is logged in the system error log.

Files

/dev/scsi0, /dev/scsi1, ..., /dev/scsin Provide an interface to allow SCSI device drivers to access SCSI devices and adapters.
/dev/vscsi0, /dev/vscsi1,..., /dev/vscsin Provide an interface to allow SCSI-2 Fast/Wide Adapter/A and SCSI-2 Differential Fast/Wide Adapter/A device drivers to access SCSI devices or adapters.

Related Information

The rmt SCSI device driver, scdisk SCSI device driver, SCSI Adapter device driver.


[ Previous | Next | Contents | Home | Search ]