A port driver must process the AEP_INITIALIZE, AEP_DEVICE_INQUIRY, AEP_CONFIG_DCB, and AEP_BOOT_COMPLETE functions that it receives during driver registration.
When processing the AEP_INITIALIZE function, the port driver must:
If the port driver completes each initialization step successfully, it returns AEP_SUCCESS. Otherwise, the driver must free the allocated DDB structure by using the ISP_DEALLOC_DDB function and return AEP_FAILURE.
When processing an AEP_DEVICE_INQUIRY function, the port driver must determine whether a drive exists for the specified drive number. If a drive does not exist, the driver must set the AEP_result member to AEP_FAILURE; otherwise, set the member to AEP_SUCCESS. The port driver will continue to receive AEP_DEVICE_INQUIRY functions until all 127 possible drive numbers have been specified or the driver sets the AEP_result member to AEP_NO_MORE-DEVICES.
When processing the AEP_CONFIG_DCB function, the port driver must insert itself into the calldown list for the DCB by using the ISP_INSERT_CALLDOWN function of the ILB_service_rtn routine. The driver must set the ISP_i_cd_req member to the address of the I/O request routine for the port driver. Subsequently, this routine is called whenever an I/O request for the device associated with the DCB is issued.
When processing the AEP_BOOT_COMPLETE function, the port driver must determine whether it successfully detected any devices it can support. If not, the driver must set the AEP_result member to AEP_FAILURE. This ensures that the port driver will be removed from memory.
A port driver should also process the AEP_IOP_TIMEOUT function. The driver should examine the given IOP structure and determine whether the IOP is one which is being processed. If it is, the driver should reset the hardware (if needed) and either retry the request or indicate an error.
Depending on whether the port driver specified additional values in the DRP_feature_code member of its DRP structure it may need to process additional asynchronous event functions.
AEP, DDB, DRP, ILB_service_rtn, IOP, ISP