HwScsiAdapterState routine

The HwScsiAdapterState routine saves or restores the state of the miniport driver's HBA.

Note  The SCSI port driver and SCSI miniport driver models may be altered or unavailable in the future. Instead, we recommend using the Storport driver and Storport miniport driver models.

 

Syntax

BOOLEAN HwScsiAdapterState(
  _In_ PVOID   HwDeviceExtension,
  _In_ PVOID   Context,
  _In_ BOOLEAN SaveState
);

Parameters

  • HwDeviceExtension [in]
    Points to the miniport driver's storage for per-HBA data.

  • Context [in]
    Is reserved for system use.

  • SaveState [in]
    TRUE indicates the miniport driver 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, FALSE otherwise.

Remarks

A miniport driver must implement this routine if both of the following are true:

  • The miniport driver's HBA has a BIOS and, therefore, can be initialized in x86 real mode.

  • The miniport driver's HBA is sensitive to x86-specific processor mode transitions.

A miniport driver can optionally implement this routine if either of the following is true:

  • The miniport driver's HBA is in x86 protected mode.

  • It is irrelevant whether the miniport driver's HBA is initialized on a CISC-or RISC-based platform.

HwScsiAdapterState is called by the x86-only, operating system-dependent port driver when the system transitions from x86 real to protected processor mode.

HwScsiAdapterState is usually called after the miniport driver's HwScsiFindAdapter routine.

The name HwScsiAdapterState is just a placeholder. The actual prototype of this routine is defined in srb.h as follows:

typedef
BOOLEAN
(*PHW_ADAPTER_STATE) (
  IN PVOID  DeviceExtension,
  IN PVOID  Context,
  IN BOOLEAN  SaveState
  );

For more information about the HwScsiAdapterState routine, see SCSI Miniport Driver's HwScsiAdapterState Routine.

Requirements

Target platform

Desktop

Header

Miniport.h (include Scsi.h)

See also

HwScsiFindAdapter

ScsiPortInitialize

 

 

Send comments about this topic to Microsoft