Provides the means to issue a SCSI Start Unit command to a selected SCSI device.
The SCIOSTUNIT operation allows the caller to issue a SCSI Start Unit command to a selected SCSI adapter. This command can be used by system management routines to aid in configuration of SCSI devices. For the SCIOSTUNIT operation, the arg parameter operation is the address of an sc_startunit structure. This structure is defined in the /usr/include/sys/scsi.h file.
The sc_startunit structure allows the caller to specify the SCSI and logical unit number (LUN) IDs of the device on the SCSI adapter that is to be started. The SC_ASYNC flag (in the flag byte of the passed parameter block) must not be set on the initial attempt of this command.
The start_flag field in the parameter block allows the caller to indicate the start option to the SCIOSTUNIT operation. When the start_flag field is set to TRUE, the logical unit is to be made ready for use. When FALSE, the logical unit is to be stopped.
Attention: When the immed_flag field is set to TRUE, the SCSI adapter device driver allows simultaneous SCIOSTUNIT operations to any or all attached devices. It is important that when executing simultaneous SCSI Start Unit commands, the caller should allow a delay of at least 10 seconds between succeeding SCSI Start Unit command operations. The delay ensures that adequate power is available to devices sharing a common power supply. Failure to delay in this manner can cause damage to the system unit or to attached devices. Consult the technical specifications manual for the particular device and the appropriate hardware technical reference for your system.
The immed_flag field allows the caller to indicate the immediate option to the SCIOSTUNIT operation. When the immed_flag field is set to TRUE, status is to be returned as soon as the command is received by the device. When the field is set to FALSE, the status is to be returned after the operation is completed. The caller should set the immed_flag field to TRUE to allow overlapping SCIOSTUNIT operations to multiple devices on the SCSI bus. In this case, the SCIOTUR operation can be used to determine when the SCIOSTUNIT has actually completed.
When completed successfully, the SCIOSTUNIT 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:
Value | Description |
---|---|
EFAULT | Indicates that a bad copy between kernel and user space occurred. |
EINVAL | Indicates that an SCIOSTART command was not issued prior to this command. |
EIO | Indicates that an unrecoverable I/O error has occurred. If EIO is received, the caller should retry this command at least once, as the first command may have cleared an error condition with the device. In case of an unrecovered error, the adapter error-status information is logged in the system error log. |
ENOCONNECT | Indicates that a bus fault has occurred. The caller should respond by retrying with the SC_ASYNC flag set in the flag byte of the passed parameters. If more than one retry is attempted, only the last retry should be made with the SC_ASYNC flag set. Generally the SCSI adapter device driver cannot determine which device caused the SCSI bus fault, so this error is not logged. |
ENODEV | Indicates that no SCSI controller responded to the requested SCSI ID. This condition is not necessarily an error and is not logged. |
ENOMEM | Indicates insufficient memory is available to complete the command. |
ETIMEDOUT | Indicates that the adapter did not respond with status before the internal command time-out value expired. If ETIMEDOUT is received, the caller should retry this command at least once, as the first command may have cleared an error condition with the device. This error is logged in the system error log. |
Item | Description |
---|---|
/dev/scsi0, /dev/scsi1,..., /dev/scsin | Provide an interface to allow SCSI device drivers to access SCSI devices or 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. |