[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Technical Reference: Kernel and Subsystems, Volume 2
SCIOINQU (Inquiry) SCSI Adapter Device Driver ioctl Operation
Purpose
Provides the means to issue an inquiry command to a
SCSI device.
Description
The SCIOINQU operation allows
the caller to issue a SCSI device inquiry command to a selected adapter. This
command can be used by system management routines to aid in configuration
of SCSI devices.
The arg parameter for the SCIOINQU operation is the address of an sc_inquiry structure. This structure is defined in the /usr/include/sys/scsi.h file. The sc_inquiry parameter
block allows the caller to select the SCSI and LUN IDs to be queried.
The SC_ASYNC flag byte of the
parameter block must not be set on the initial call to this operation. This
flag is only set if a bus fault occurs and the
caller intends to attempt more than one retry.
If successful, the returned inquiry data can be found
at the address specified by the caller in the sc_inquiry structure. Successful completion occurs if a device responds at the
requested SCSI ID, but the returned inquiry data must be examined to see if
the requested LUN exists. Refer to the Small Computer System
Interface (SCSI) Specification for the applicable device for the format
of the returned data.
Note
The SCSI adapter device driver performs normal error-recovery
procedures during execution of this command.
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:
Value |
Description |
EFAULT |
Indicates that a bad copy between kernel and user space occurred. |
EINVAL |
Indicates that a SCIOSTART command was not
issued prior to this command. |
EIO |
Indicates that an unrecoverable I/O error has occurred. If EIO is returned, the caller should retry the SCIOINQU operation since 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 return value implies that no LUNs exist on the requested SCSI ID.
Therefore, when the ENODEV return value is encountered,
the caller can skip this SCSI ID (and all LUNs on it) and go on to the next
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 a status before the
internal command time-out value expired. On receiving the ETIMEDOUT return value, the caller should retry this command at least
once, since the first command may have cleared an error condition with the
device. 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/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.
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]