The IOCC_EXECUTE_IO CommandCode consists of all CommandModifiers responsible for issuing a Read or Write to a unit. The following table describes the IOCC_EXECUTE_IO CommandModifiers:
┌────────────────────────┬────────────────────────────────────┐ │CommandModifier │Description │ ├────────────────────────┼────────────────────────────────────┤ │IOCM_READ │Reads a unit's data into the │ │ │scatter/gather list buffers. │ ├────────────────────────┼────────────────────────────────────┤ │IOCM_READ_VERIFY │Verifies that the recorded data at │ │ │the requested I/O address is │ │ │readable. No data is transferred. │ ├────────────────────────┼────────────────────────────────────┤ │IOCM_READ_PREFETCH │Reads data from the device into the │ │ │adapter's hardware cache. Support of│ │ │this command is optional. │ ├────────────────────────┼────────────────────────────────────┤ │IOCM_WRITE │Writes data from the scatter/gather │ │ │list buffers to the unit's specified│ │ │I/O address. │ ├────────────────────────┼────────────────────────────────────┤ │IOCM_WRITE_VERIFY │Writes data from the scatter/gather │ │ │list buffers to the unit's specified│ │ │I/O address, then verifies that the │ │ │data can be read (Write/Read Verify │ │ │combination). │ └────────────────────────┴────────────────────────────────────┘
Remarks
Support:
Format of IORB
IORB_EXECUTEIO Description
This section defines the IORB_EXECUTEIO 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 │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │RBA │ULONG │DD │I/O starting │ │ │ │ │address │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │BlockCount │USHORT │DW │Sector count │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │BlocksXferred │USHORT │DW │Number of sectors│ │ │ │ │transferred │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │BlockSize │USHORT │DW │Number of bytes │ │ │ │ │per sector │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │Flags │USHORT │DW │I/O-specific │ │ │ │ │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).
pSGLIST
contains a far pointer to the scatter/gather list, supplied by the caller.
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. (See 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.
RBA
contains the starting relative block address for the data transfer operation.
If the IORB_CHS_ADDRESSING flag is set in the IORBH RequestControl field,
then the format of the RBA field is defined by the CHS_ADDR structure.
(See the following table.)
┌─────────────────┬─────────────────┬─────────┬─────────────────┐ │Field Name │C Type │Length │Description │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │Cylinder │USHORT │DW │Starting cylinder│ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │Head │UCHAR │DB │Starting head │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │Sector │UCHAR │DB │Starting sector │ └─────────────────┴─────────────────┴─────────┴─────────────────┘
BlockCount
contains the number of sectors (length = BlockSize) to transfer.
Note: If this value exceeds the adapter's maximum transfer size, the driver is responsible for issuing multiple operations to the unit to complete the caller's request.
BlocksXferred
equals 0 on entry. On exit from the driver BlocksXferred contains
the number of sectors successfully transferred.
BlockSize
contains the number of bytes in a block or sector. The IBM OS/2 2.0 File
System supports only a value of 512.
Flags
defines Execute I/O cache control flags, as shown in the table below.
┌──────────────────────────────┬──────────────────────────────┐ │Flag │Description │ ├──────────────────────────────┼──────────────────────────────┤ │XIO_DISABLE_HW_WRITE_CACHE │Disable-deferred Write. │ │ │Indicates the driver should │ │ │ensure that the requested data│ │ │is written to the media prior │ │ │to doing a notification │ │ │callout. │ ├──────────────────────────────┼──────────────────────────────┤ │XIO_DISABLE_HW_READ_CACHE │Disable Read caching. │ │ │Indicates to the driver that │ │ │the data being read is of a │ │ │transient nature and does not │ │ │need to be retained in the │ │ │adapter's hardware cache. │ └──────────────────────────────┴──────────────────────────────┘
Note: The scatter/gather list-related fields (cSGLIST, pSGLIST, and ppSGLIST) are at the same offset as their equivalent pointers in the IOCC_ADAPTER_PASSTHRU and IOCC_FORMAT CommandCodes.
On exit, the driver sets the Status and ErrorCode fields of the IORBH to reflect the results of the IOCC_EXECUTE_IO request.
Return Codes
Following is a list of the IOCC_EXECUTE_IO 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_RBA_ADDRESSING_ERROR
IOERR_RBA_LIMIT
IOERR_RBA_CRC_ERROR
IOERR_MEDIA_NOT_FORMATTED
IOERR_MEDIA_NOT_SUPPORTED
IOERR_MEDIA_WRITE_PROTECT
IOERR_MEDIA_CHANGED
IOERR_MEDIA_NOT_PRESENT
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.