Closes a logical path to a SCSI initiator device.
The SCIOSTOPTGT operation closes a logical path to a SCSI initiator device, where the host SCSI adapter acts as a target. This operation causes the adapter device driver to deallocate device-dependent information areas allocated in response to the SCIOSTARTTGT operation. It also causes the adapter device driver to deallocate system buffer areas used to hold data received from the initiator. Finally, it disables the host adapter's ability to receive data from the selected initiator.
This operation may only be called from a kernel process or device driver.
The arg parameter to the SCIOSTOPTGT operation should be set to the address of an sc_stop_tgt structure, which is defined in the /usr/include/sys/scsi.h file. The caller fills in the id field with the SCSI ID of the initiator and sets the logical unit number (LUN) field to 0 as the initiator LUN is ignored for received data.
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:
Item | Description |
---|---|
EINVAL | An SCIOSTOPTGT command has not been previously issued to this SCSI ID. |
EPERM | Indicates the caller is not running in kernel mode, which is the only mode allowed to execute this operation. |
Item | Description |
---|---|
/dev/scsi0, /dev/scsi1, ... | 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. |