The IOCC_ADAPTER_PASSTHRU CommandCode consists of all the CommandModifiers responsible for issuing SCSI-formatted requests to a unit. The following table describes the CommandModifiers:
┌────────────────────────┬────────────────────────────────────┐ │CommandModifier │Description │ ├────────────────────────┼────────────────────────────────────┤ │IOCM_EXECUTE_SCB │Issues an IBM Subsystem Control │ │ │Block (SCB) request to the specified│ │ │unit. │ │ │Support of this command is optional.│ ├────────────────────────┼────────────────────────────────────┤ │IOCM_EXECUTE_CDB │Issues a SCSI Command Descriptor │ │ │Block (CDB) request to the specified│ │ │unit. │ │ │This command is mandatory for all │ │ │SCSI units. │ └────────────────────────┴────────────────────────────────────┘
Remarks
Support:
Format of IORB
IORB_ADAPTER_PASSTHRU Description
This section defines the IORB_ADAPTER_PASSTHRU control block. (See the following table.)
┌─────────────────┬─────────────────┬─────────┬─────────────────┐│Field Name │C-Type │Length │Description │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │iorbh │IORBH │DB(68) │IORB header │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │cSGLIST │USHORT │DW │Number of │ │ │ │ │elements │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │pSGLIST │PSCATGATENTRY │DD │Far pointer to │ │ │ │ │s/g list │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │ppSGLIST │ULONG │DD │Physical address │ │ │ │ │of s/g list │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │ControllerCmdLen │USHORT │DW │Length │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │pControllerCmd │PBYTE │DD │Controller │ │ │ │ │command pointer │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │ppSCB │ULONG │DD │Physical SCB │ │ │ │ │pointer │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │Flags │USHORT │DW │Flags │ └─────────────────┴─────────────────┴─────────┴─────────────────┘
On entry to the driver:
iorbh
See IORB General Format.
cSGList
contains the number of scatter/gather elements in the scatter/gather list
(pSGLIST), for IOCM_EXECUTE_CDB requests. For all other requests
this field contains a 0. pSGLIST
contains a far pointer to the scatter/gather list, supplied by the caller,
for IOCM_EXECUTE_CDB requests. For all other requests this field contains
a 0. The scatter/gather list consists of an array of cSGList elements,
each pointing to a physically contiguous area of real memory in a format
defined by the SCATGATENTRY structure, shown in the following table.
┌─────────────────┬─────────────────┬─────────┬─────────────────┐ │Field Name │C-Type │Length │Description │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │ppXferBuf │ULONG │DD │Physical pointer │ │ │ │ │to buffer │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │XferBufLen │ULONG │DD │Length of buffer │ └─────────────────┴─────────────────┴─────────┴─────────────────┘
ppSGLIST
contains a 32-bit physical address of the scatter/gather list for IOCM_EXECUTE_CDB
requests. For all other requests, this field contains a 0.
ControllerCmdLen
contains the length, in bytes, of the command controller buffer.
pControllerCmd
contains a pointer to the controller command buffer in either SCB or CDB
format, based on the CommandModifier field.
ppSCB
contains a 32-bit physical address of the Subsystem Control Block (SCB)
for IOCM_EXECUTE_SCB requests. For all other requests, this field contains
a 0.
Flags
contains flags to define the request, as shown in the following table.
┌────────────────────────┬────────────────────────────────────┐ │Flag │Description │ ├────────────────────────┼────────────────────────────────────┤ │PT_DIRECTION_IN │Data transfer direction. This flag │ │ │defines the direction of the data │ │ │transfer for IOCM_EXECUTE_CDB │ │ │requests. If set, the data transfer│ │ │is from the target device to the │ │ │host adapter. For all other │ │ │requests, this flag is ignored. │ └────────────────────────┴────────────────────────────────────┘
On exit, the driver sets the Status and ErrorCode fields of the IORBH to reflect the results of the IOCC_ADAPTER_PASSTHRU request.
Return Codes
Following is a list of the IOCC_ADAPTER_PASSTHRU error codes:
IOERR_CMD_NOT_SUPPORTED
IOERR_CMD_SYNTAX
IOERR_CMD_SGLIST_BAD
IOERR_CMD_SW_RESOURCE
IOERR_CMD_ABORTED
IOERR_UNIT_NOT_ALLOCATED
IOERR_UNIT_NOT_READY
IOERR_UNIT_PWR_OFF
IOERR_ADAPTER_HOSTBUSCHECK
IOERR_ADAPTER_DEVICEBUSCHECK
IOERR_ADAPTER_OVERRUN
IOERR_ADAPTER_UNDERRUN
IOERR_ADAPTER_DIAGFAIL
IOERR_ADAPTER_TIMEOUT
IOERR_ADAPTER_DEVICE_TIMEOUT
IOERR_ADAPTER_REQ_NOT_SUPPORTED
IOERR_ADAPTER_REFER_TO_STATUS
IOERR_DEVICE_DEVICEBUSCHECK
IOERR_DEVICE_REQ_NOT_SUPPORTED
IOERR_DEVICE_DIAGFAIL
IOERR_DEVICE_BUSY
IOERR_DEVICE_OVERRUN
IOERR_DEVICE_UNDERRUN
For a detailed description of all the return codes, see Error Handling.