StorPortPoFxActivateComponent routine

The StorPortPoFxActivateComponent routine increments the activation reference count on the specified component of a storage device.

Syntax


ULONG StorPortPoFxActivateComponent(
  _In_      PVOID HwDeviceExtension,
  _In_opt_  PSTOR_ADDRESS Address,
  _In_opt_  PSCSI_REQUEST_BLOCK Srb,
  _In_      ULONG Component,
  _In_      ULONG Flags
);

Parameters

HwDeviceExtension [in]

A pointer to the hardware device extension for the host bus adapter (HBA).

Address [in, optional]

The address of a storage device unit. This parameter is NULL when activating a storage adapter component.

Srb [in, optional]

The SRB triggering the component activation. This parameter is NULL if the miniport is activating a device component for a request not sent through Storport.

Component [in]

The index that identifies the component. This parameter is an index into the Components array in the STOR_POFX_DEVICE structure that the miniport driver registered for the device with a call to StorPortInitializePoFxPower. If the Components array contains N elements, component indexes range from 0 to N–1.

Flags [in]

Not used. Set to 0.

Return value

The StorPortPoFxActivateComponent routine returns one of these status codes:

Return codeDescription
STOR_STATUS_SUCCESS

The storage device activation reference was successfully incremented and the component is in the active state.

STOR_STATUS_INVALID_PARAMETER

Either HwDeviceExtension or Device is NULL.

-or-

Address points to an invalid unit address structure.

-or-

The storage device specified by Address is not found.

-or-

The storage device is not registered with the power management framework (PoFx).

-or-

The SRB pointed to by Srb is not sent from Storport.

-or-

The Flags parameter is nonzero.

STOR_STATUS_INVALID_DEVICE_REQUEST

TThe adapter or unit does not support PoFx.

STOR_STATUS_INVALID_IRQL

The current IRQL > DISPATCH_LEVEL.

STOR_STATUS_BUSY

The storage device activation reference was successfully incremented but the component is still in the idle state

 

Remarks

Currently, both adapter devices and unit devices have maximum component count of 1. The index in Component must always be set to 0.

Each call to StorPortPoFxActivateComponent must be matched with a subsequent call to StorPortPoFxIdleComponent.

Requirements

Version

Available in starting with Windows 8.

Header

Storport.h

Library

Storport.lib

IRQL

IRQL <= DISPATCH_LEVEL

See also

STOR_POFX_DEVICE
StorPortInitializePoFxPower
StorPortPoFxIdleComponent

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft