Purpose, Description – Compex Systems Advanced SerialRAID Adapters SA33-3285-02 User Manual

Page 303

Advertising
background image

SSADISK_SCSI_CMD (SCSI Command) SSA Disk Device Driver ioctl Operation

Purpose

To provide a method of sending Serial Storage Architecture - Small Computer Systems
Interface (SSA-SCSI) commands to an SSA physical disk drive that has been opened
with the SSADISK_SCSIMODE extension flag.

Description

The SSADISK_SCSI_CMD operation allows the caller to issue an SSA-SCSI command
to a selected physical disk. The caller must be root, or have an effective user ID of root,
to issue this ioctl.

The arg parameter for the SSADISK_ISALMgr_CMD operation is the address of an
ssadisk_ioctl_parms structure. This structure is defined in the
/usr/include/sys/ssadisk.h file.

The SSADISK_SCSI_CMD operation uses the following fields of the
ssadisk_ioctl_parms structure:

dsb

Contains the directive status byte that is returned for the command. The byte
contains a value from the /usr/include/ipn/ipndef.h file. A non-zero value
indicates an error.

result

Contains the IPN result word that is returned by IPN for the command. The
word contains values from the /usr/include/ipn/ipntra.h file. A non-zero value
indicates an error.

u0.scsi.data_descriptor

Set by the caller to describe the buffer for any data that is transferred by the
SCSI command. If no data is transferred, the length of the buffer should be set
to 0.

u0.scsi.direction

Set by the caller to indicate the direction of the transfer. Valid values are:

SSADISK_SCSI_DIRECTION_NONE

No data transfer is involved for the command.

SSADISK_SCSI_DIRECTION_READ

Data is transferred from the subsystem into the using system memory.

SSADISK_SCSI_DIRECTION_WRITE

Data is transferred from the using system memory into the
subsystem.

u0.scsi.identifier

Identifies the SSA-SCSI logical unit number to which the command should be
sent. The format of this field is as defined for SSA_SCSI (bit 7=1 identifies the
Target routine, bits 6-0 identify the Logical Unit routine).

u0.scsi.cdb

Set by the caller to define the SCSI Command Descriptor Block (CDB) for the
command.

Chapter 13. Using the Programming Interface

283

Advertising