HwScsiAdapterState

BOOLEAN
HwScsiAdapterState(

IN PVOID HwDeviceExtension,
IN PVOID Context,
IN BOOLEAN SaveState
);

A miniport driver’s HwScsiAdapterState routine saves or restores the HBA state according to the value of the SaveState parameter. If its HBA has a BIOS and, therefore, can be initialized in x86 real mode, a miniport driver must have this routine, which is called by the x86-only, OS-dependent port driver when the system transitions from x86 real to protected processor mode.

Parameters

HwDeviceExtension

Points to the miniport driver’s storage for per-HBA data.

Context

Is reserved for system use.

SaveState

TRUE indicates the miniport should save the current state of the HBA until the HwScsiAdapterState routine is called again with SaveState set to FALSE to restore the saved state.

Return Value

HwScsiAdapterState returns TRUE if it successfully saved or restored the HBA state.

Comments

Miniport drivers of HBAs that are initialized in x86 real mode and that are sensitive to x86-specific processor mode transitions must have a HwScsiAdapterState routine. This routine, which is usually called after the miniport’s HwScsiFindAdapter routine, preserves the initialized HBA state during x86-only system transition(s) from x86 real to protected processor mode.

HwScsiAdapterState is responsible for saving the current state of the HBA in the HwDeviceExtension when it is called with SaveState set to TRUE. It must restore the HBA state when it is called subsequently with SaveState set to FALSE.

Miniport drivers of HBAs that are initialized in x86 protected mode and miniports for which it is irrelevant whether their HBAs are being initialized on a CISC-or RISC-based platform need not have this routine.

See Also

HwScsiFindAdapter, ScsiPortInitialize