#include <isp.h> typedef struct ISP { USHORT ISP_func; // function; see below USHORT ISP_result; // result; zero if successful } ISP, *PISP;
Contains information for an IOS service request.
ISP_func
Function to perform. Can be one of these values:
ISP_CREATE_DDB | Creates a device descriptor block (DDB). This is typically called by a port driver to create a per controller data structure when processing the AEP_INITIALIZE function. Uses ISP_ddb_create structure. |
ISP_CREATE_DCB | Creates a device control block (DCB) for a physical device. Uses ISP_dcb_create structure. |
ISP_CREATE_IOP | Creates an input and output packet (IOP). Uses ISP_IOP_create structure. |
ISP_ALLOC_MEM | Allocates memory. Uses ISP_mem_alloc structure. |
ISP_DEALLOC_MEM | Deallocates memory. Uses ISP_mem_dealloc structure. |
ISP_INSERT_CALLDOWN | Inserts entry in calldown table. Typically used by a layer driver to insert its request entry point into the DCB call down list. This ensures that the driver will see all input and output requests to that device. The driver can also allocate a per I/O request packet area called the expansion area. This becomes part of the IOP and can be accessed when the request is being processed by each layer. Uses ISP_calldown_insert structure. |
ISP_ASSOCIATE_DCB | Associates DCB with a relative drive number. This service is usually called by a TSD. The TSD is responsible for determining the logical drives associated with a physical drive. This service associates a logical drive letter with a logical DCB or an INT 13h drive number with a physical. In the case of logical association, this service calls IFSMGR and sends out a WM_DEVICECHANGE/DBT_DEVICEARRIVAL broadcast to notify the system of a volume arrival. Value add drivers also may need to make this call. For instance, a compression layer would call this service as and when it determines a compressed volume that is associated with a host. Uses ISP_dcb_associate structure. |
ISP_GET_DCB | Returns the DCB for the given logical volume. Uses ISP_dcb_get structure. |
ISP_GET_FIRST_NEXT_DCB | Returns the first or next DCB. Uses ISP_GET_FRST_NXT_DCB structure. |
ISP_DEALLOC_DDB | Deallocates a DDB. Used typically by a port driver when the controller associated with the DDB is removed. The IOS sends an AEP_UNINITIALIZE function at this time and port drivers typically deallocate any resources that they may have allocated to handle I/O to the controller represented by that DDB. For instance, the driver frees IRQ, removes port trapping, and so on. Uses ISP_DDB_DEALLOC structure. |
ISP_DESTROY_DCB | Destroys a DCB. Used when a device is removed, this service should be called at application time (Appy time) only. This service broadcasts an AEP_PEND_UNCONFIG_DCB to all the layer drivers to direct the drivers to stop generating new requests for this device. Execution blocks until all pending I/O to the device is complete; subsequent I/O requests to this DCB generate errors. For all logical drives associated with this physical device, the IFSMGR is notified of the volume removal. Also a WM_DEVICECHANGE/DBT_DEVICEREMOVECOMPLETE message is broadcast. The IOS sends an AEP_UNCONFIG_DCB function to all the layer drivers. The drivers do any necessary processing at this point. All VRPs and calldown nodes associated with the DCB are freed. Finally the DCB itself is freed. Uses ISP_DCB_DESTROY structure. |
ISP_QUERY_MATCHING_DCBS | Determines whether matching logical and physical DCBs exist. Intended for use by the TSD to find any relationships it is unable to deduce. For example, in order to associate compressed volumes to a particular physical DCB, the DiskTSD queries all the layer drivers using this function. The function sends an AEP_ASSOCIATE_DCB function to all the layer drivers. The TSD then associates the additional logical volumes to the physical if the real mode mapper has not already claimed that logical volume. The real mode mapper may claim a logical volume if there is an unsafe device driver hooking the real mode driver chain for that volume. Uses ISP_QUERY_MATCH structure. |
ISP_QUERY_REMOVE_DCB | Determines whether a device can be removed. Broadcasts a DBT_DEVICEQUERYREMOVE message and also queries the IFSMGR by calling the IFSMGR service QueryVolumeRemoval. This call can be failed by any application or the IFSMGR if they believe that this volume cannot be removed. This is an Appy time only service. Uses ISP_QUERY_REMOVE structure. |
ISP_DEVICE_REMOVED | Indicates that a device has been removed. Broadcasts a DBT_DEVICEREMOVECOMPLETE message for all the logical volumes associated with the physical DCB. This is typically called if the media is ejected from the drive in which case ISP_DEV_REMOVED_FL_MEDIA_ONLY should be set. This is an Appy time only service. Uses ISP_DEV_REMOVED structure. |
ISP_DEVICE_ARRIVED | Indicates that a device has arrived. Broadcasts a DBT_DEVICEARRIVAL message for all the logical volumes associated with the physical DCB. This is typically called if the media is inserted in the drive in which case ISP_DEV_REMOVED_FL_MEDIA_ONLY should be set. This is an Appy time only service. Uses ISP_DEV_ARRIVED structure. |
ISP_DISASSOCIATE_DCB | Disassociates the logical drive number from the DCB that is currently associated to it. The IFSMGR is also notified of a volume removal. This is typically called by a value added driver when the volumes that it associated by using ISP_QUERY_MATCH are going away. Uses ISP_DISASSOC_DCB structure. |
ISP_DRIVE_LETTER_PICK | Picks a drive letter. Uses ISP_pick_drive_letter structure. Provides a drive letter for a potential logical volume. This volume cannot be a volume that is visible in real mode, as the protect mode drive letter for that volume will match the real mode drive. The criteria for the search are specified in ISP_p_d_l_flags. If nothing is specifed, the UserDriveLetterAssignment value in the registry for this DCB is read and a drive letter that falls in this range is provided. If there is no registry entry the next available drive letter is picked. |
If the ISP_PDL_FL_USE_RANGE flag is set, the caller provides a search range starting with the letter in ISP_p_d_l_letter[0] and ending with the letter in ISP_p_d_l_letter[1]. The registry is read and a drive letter in the range that is an intersection of the registry range and the user range is picked. If all the letters in this range are used the next available drive letter is picked unless the ISP_PDL_FL_USER_ONLY flag is set in which case the call is failed. | |
In the case where a registry range is specified, when scanning for drive letters in this range, if a drive letter is already used then the following two flags provide additional directions to the service: ISP_PDL_FL_OK_RM_CD specifies that it is OK to pick the already used drive letter if it was a real mode CD drive; ISP_PDL_FL_OK_INVALID_RM specifies that it is OK to pick the already used drive letter if it is an invalid drive in real mode. | |
ISP_REGISTRY_READ | Reads registry information corresponding with the physical DCB provided. The parameter definitions are identical to those of VMM service _RegQueryValueEX. Other common registry values for devnodes, like class name, can also be read using this service for that DCB. Uses ISP_read_registry structure. |
ISP_FIND_LDM_ENTRY | Finds an LDM entry for the specified drive. Uses ISP_FIND_LDM structure. |
ISP_DELETE_LDM_ENTRY | Deletes an LDM entry for the specified drive. Deletion is accomplished by compacting the LDM table to copy over the deleted entry. Therefore, clients should not rely on a pointer to an LDM entry after yielding. Uses ISP_FIND_LDM structure. |
ISP_BROADCAST_AEP | Broadcasts the given AEP to the entire driver architecture. Uses ISP_AEP_BROADCAST structure. |
See also DCB, DDB, IOP, AEP