The IOCC_UNIT_CONTROL CommandCode consists of all the CommandModifiers responsible for controlling the ownership of a unit. The following table describes the CommandModifiers.
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³CommandModifier ³Description ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³IOCM_ALLOCATE_UNIT ³Assigns ownership of the specified ³ ³ ³unit to the caller. A unit must be ³ ³ ³allocated prior to accepting any ³ ³ ³other direct call commands. Once ³ ³ ³allocated, a unit cannot be assigned³ ³ ³to another owner until that unit is ³ ³ ³deallocated. It is the ³ ³ ³responsibility of the owner to ³ ³ ³coordinate sharing of a unit. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³IOCM_DEALLOCATE_UNIT ³Removes the caller's ownership of ³ ³ ³the specified unit. Once ³ ³ ³deallocated, a unit can be assigned ³ ³ ³to another owner. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³IOCM_CHANGE_UNITINFO ³Modifies the specified unit's ³ ³ ³UNITINFO portion of the DEVICETABLE ³ ³ ³structure with the information ³ ³ ³passed by the caller. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙRemarks
Support:
Format of IORB
IORB_UNIT_CONTROL Description
This section defines the IORB_UNIT_CONTROL control block. (See the table below.)
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿³Field Name ³C Type ³Length ³Description ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³iorbh ³IORBH ³DB(68) ³IORB header ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³Flags ³USHORT ³DW ³Flags ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³pUnitInfo ³PUNITINFO ³DD ³Pointer to ³ ³ ³ ³ ³UnitInfo ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³UnitInfoLen ³USHORT ³DW ³Length of ³ ³ ³ ³ ³UnitInfo ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
On entry to the driver:
iorbh
See IORB General Format.
Flags
contains a 0.
pUnitInfo
contains a far pointer to a buffer containing modified unit characteristics,
in the format defined by the UNITINFO structure. The adapter device driver
uses this information to update the unit's UNITINFO structure in the DEVICETABLE.
This field is valid only for the IOCM_CHANGE_UNITINFO CommandModifier.
Note: A device driver can access the UNITINFO structure provided by the IOCM_CHANGE_UNITINFO IORB at any time. The caller, therefore, must not invalidate or release the passed UNITINFO structure on successful completion of this IORB request.
UnitInfoLen
contains the length, in bytes, of the UNITINFO buffer (pUnitInfo)
passed to the driver. This field is valid only for the IOCM_CHANGE_UNITINFO
CommandModifier.
On exit, the driver sets the Status and ErrorCode fields of the IORBH to reflect the results of the IOCC_UNIT_CONTROL request.
Return Codes
Following is a list of the IOCC_UNIT_CONTROL error codes:
IOERR_CMD_SYNTAX
IOERR_CMD_SW_RESOURCE
IOERR_UNIT_ALLOCATED
IOERR_UNIT_NOT_ALLOCATED
For a detailed description of all the return codes, see Error Handling.