The IOCC_DEVICE_CONTROL CommandCode consists of all the CommmandModifiers responsible for device control.
The following table describes the IOCC_DEVICE_CONTROL CommandModifiers:
┌────────────────────────┬────────────────────────────────────┐ │CommandModifier │Description │ ├────────────────────────┼────────────────────────────────────┤ │IOCM_ABORT │Aborts the unit's current operation │ │ │and causes the driver to return any │ │ │pending work in its queues. │ │ │Support is mandatory for SCSI │ │ │devices. │ ├────────────────────────┼────────────────────────────────────┤ │IOCM_RESET │Resets the unit to its default │ │ │operating parameters. │ │ │Support is mandatory for SCSI │ │ │devices. │ ├────────────────────────┼────────────────────────────────────┤ │IOCM_SUSPEND │Suspends the unit's current │ │ │operation. This command provides for│ │ │sharing disk controller hardware │ │ │with other device drivers. │ │ │Support is mandatory for diskette │ │ │controllers. │ ├────────────────────────┼────────────────────────────────────┤ │IOCM_RESUME │Resumes the unit's suspended │ │ │operation. This command provides │ │ │for the sharing of the diskette │ │ │controller with other device │ │ │drivers. │ │ │Support is mandatory for diskette │ │ │controllers. │ ├────────────────────────┼────────────────────────────────────┤ │IOCM_LOCK_MEDIA │Locks the current media in the unit.│ │ │Support is mandatory for SCSI │ │ │adapter device drivers and for other│ │ │devices that support a media-locking│ │ │function. │ ├────────────────────────┼────────────────────────────────────┤ │IOCM_UNLOCK_MEDIA │Unlocks the current media from the │ │ │unit. │ │ │Mandatory for SCSI adapter device │ │ │drivers and for other devices that │ │ │support a media-locking function. │ ├────────────────────────┼────────────────────────────────────┤ │IOCM_EJECT_MEDIA │Ejects the current media from the │ │ │unit. │ │ │Mandatory for SCSI adapter device │ │ │drivers and for other devices that │ │ │support a media-locking function. │ └────────────────────────┴────────────────────────────────────┘
Remarks
Support:
Format of IORB
IORB_DEVICE_CONTROL Description
This section defines the IORB_DEVICE_CONTROL control block. (See the following table.)
┌─────────────────┬─────────────────┬─────────┬─────────────────┐│Field Name │C-Type │Length │Description │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │iorbh │IORBH │DB(68) │IORB header │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │Flags │USHORT │DW │Flags │ ├─────────────────┼─────────────────┼─────────┼─────────────────┤ │Reserved │USHORT │DW │Reserved │ └─────────────────┴─────────────────┴─────────┴─────────────────┘
On entry to the driver:
iorbh
See IORB General Format.
Flags
contains flags defined only for IOCM_SUSPEND requests. For all other requests,
this field equals 0.
The following table describes the IOCM_SUSPEND flags.
┌────────────────────────┬────────────────────────────────────┐ │Flag │Description │ ├────────────────────────┼────────────────────────────────────┤ │DC_SUSPEND_DEFERRED │Suspend on idle. If set, this flag │ │ │indicates that the suspend should │ │ │occur once the unit is idle. │ ├────────────────────────┼────────────────────────────────────┤ │DC_SUSPEND_IMMEDIATE │Suspend immediate. If set this flag│ │ │indicates that the suspend should │ │ │occur once the current request is │ │ │complete. │ └────────────────────────┴────────────────────────────────────┘
Reserved
contains a 0.
On exit, the driver sets the Status and ErrorCode fields of the IORBH to reflect the results of the IOCC_DEVICE_CONTROL request.
Return Codes
Following is a list of the IOCC_DEVICE_CONTROL error codes:
IOERR_CMD_NOT_SUPPORTED
IOERR_CMD_SYNTAX
IOERR_CMD_SW_RESOURCE
IOERR_UNIT_NOT_ALLOCATED
IOERR_UNIT_NOT_READY
IOERR_UNIT_PWR_OFF
For a detailed description of all the return codes, see Error Handling.