StorPortInitializePerfOpts function (storport.h)

The StorPortInitializePerfOpts function initializes the performance optimizations that both the miniport driver and the Storport driver support using a PERF_CONFIGURATION_DATA structure.

Syntax

ULONG StorPortInitializePerfOpts(
  [in]      PVOID                    HwDeviceExtension,
  [in]      BOOLEAN                  Query,
  [in, out] PPERF_CONFIGURATION_DATA PerfConfigData
);

Parameters

[in] HwDeviceExtension

A pointer to the hardware device extension for the host bus adapter (HBA). This parameter must not be NULL.

[in] Query

If set to TRUE, Storport will set the flags in PerfConfigData corresponding to the optimizations Storport supports. If set to FALSE, Storport will initialize the optimizations specified by the flags in PerfConfigData.

[in, out] PerfConfigData

A pointer to a PERF_CONFIGURATION_DATA structure that is supplied by the miniport driver. This parameter must not be NULL.

Return value

StorPortInitializePerfOpts returns one of the following status values:

Return code Description
STOR_STATUS_NOT_IMPLEMENTED
This function is not implemented on the active operating system.
STOR_STATUS_SUCCESS
Indicates that the performance optimization settings have been applied.

Or if Query is set to TRUE, the Flags member of the structure pointed to by PerfConfigData contains the supported flags.

STOR_STATUS_UNSUCCESSFUL
The miniport driver set a flag in PerfConfigData that Storport did not recognize, or the miniport driver has called this routine from outside the miniport-driver-supplied HwStorInitialize routine.
STOR_STATUS_INSUFFICIENT_RESOURCES
Unable to allocate internal structures to support the requested optimizations.
STOR_STATUS_INVALID_PARAMETER
Either the HwDeviceExtension parameter or the PerfConfigData parameter was NULL.

Remarks

The miniport driver can call StorPortInitializePerfOpts only during the miniport-supplied HwStorInitialize routine or HwStorPassiveInitializeRoutine routine.

Available performance optimizations depend on the version of PERF_CONFIGURATION_DATA. Setting the Version member to STOR_PERF_VERSION will allow all supported optimizations to be selected.

Requirements

Requirement Value
Target Platform Universal
Header storport.h (include Storport.h)
DDI compliance rules StorPortPerfOpts(storport)

See also

PERF_CONFIGURATION_DATA