HAI_Disable_Real_Mode_Access

Prevents access to real mode during critical periods.

Thread Context:Non-Blocking

Syntax

    LONG HAI_Disable_Real_Mode_Access (
       LONG npaHandle
       );
    
    

Parameters

npaHandle
(IN) The HAM's handle for using the NWPA APIs. Its value was assigned during NPA_Register_HAM_Module.

Return Values

The following table lists return values and descriptions.

zero

Successful completion. Real mode access is disabled.

1

Invalid npaHandle.

2

The switch to real mode is already in progress.

Remarks

HAI_Disable_Real_Mode_Access is used to prevent a switch to real mode from protected mode. This can be used by a HAM during times when a thread switch that allowed real mode access could cause problems with an adapter. This function is generally intended for use by a HAM during adapter initialization. For example, if a DOS driver for a host adapter has set up a real mode configuration on the adapter, it expects that configuration is available each time it accesses the adapter. However, if a HAM is in the process of configuring the adapter in protected mode, real mode access must be disabled until the HAM can complete its configuration, save the protected mode configuration, and restore the DOS configuration. At this point, the HAM should then use HAI_Enable_Real_Mode_Access to allow real mode access again. Real mode access should not be disabled for extended periods of time.