HAI_Deactivate_Bus

Deactivates a device bus instance of the HAM.

Thread Context:Blocking or Non-Blocking

Syntax

    LONG HAI_Deactivate_Bus (
       LONG   npaBusHandle,
       LONG   hamBusHandle,
       LONG   npaHandle
       );
    
    

Parameters

npaBusHandle
(IN) NWPA-generated handle to the target bus. This parameter was output to the HAM from HAI_Activate_Bus when the bus was activated.
hamBusHandle
(IN) HAM-generated handle to the target bus instance the HAM is managing. From this handle, the HAM must be able to locate its list of devices attached to the bus. The HAM passed this parameter to HAI_Activate_Bus when the bus was activated.
npaHandle
(IN) The HAM's handle for using the NPA APIs. Its value was assigned during NPA_Register_HAM_Module.

Return Values

The following table lists return values and descriptions.

zero

Successful

nonzero

Unsuccessful

Remarks

HAI_Deactivate_Bus is used to deactivate a bus in preparation for the HAM or bus instance to be unloaded. It is called within the context of HAM_Unload or HAM_Instance_Unload (Function 0x09) to abort outstanding requests before the HAM or bus instance is unloaded. This API must be called for each bus instance that the HAM supports. When the HAI_Deactivate_Bus function completes, NWPA ensures there are no outstanding requests for this particular bus instance and that no further requests are sent to the devices on the specified bus.