SCIOSTUNIT (Start Unit) SCSI Adapter Device Driver ioctl Operation
Purpose
Provides the means to issue a SCSI Start Unit command to a selected SCSI device.
Description
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.
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 when 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 must 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 completed.
Return Values
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 must retry this command at least once, as the first command may have cleared an error
condition with the device. If there is 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 must 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 must 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 must 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. |
Files
| 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. |