Bewerken

Delen via


StorPortPoFxIdleComponent function (storport.h)

The StorPortPoFxIdleComponent routine decrements the activation reference count of a specified component of a storage device.

Syntax

ULONG StorPortPoFxIdleComponent(
  [in]           PVOID               HwDeviceExtension,
  [in, optional] PSTOR_ADDRESS       Address,
  [in, optional] PSCSI_REQUEST_BLOCK Srb,
  [in]           ULONG               Component,
  [in]           ULONG               Flags
);

Parameters

[in] HwDeviceExtension

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

[in, optional] Address

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

[in, optional] Srb

The SRB triggering the component deactivation. This parameter is NULL if the miniport is idling a device component internally.

[in] Component

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.

[in] Flags

Not used. Set to 0.

Return value

The StorPortPoFxIdleComponent routine returns one of these status codes:

Return code Description
STOR_STATUS_SUCCESS
The storage device activation reference was successfully decremented and the component is idle.
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
The adapter or unit does not support PoFx.

-or-

StorPortPoFxIdleComponent was called with an inactive Component and an Srb for which a previous call to StorPortPoFxActivateComponent was not performed.

STOR_STATUS_INVALID_IRQL
The current IRQL > DISPATCH_LEVEL.
STOR_STATUS_BUSY
The active reference for the device component was decremented but the component is still active.

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 StorPortPoFxIdleComponent must be matched with a previous call to StorPortPoFxActivateComponent.

Requirements

Requirement Value
Minimum supported client Available in starting with Windows 8.
Target Platform Universal
Header storport.h
IRQL Any

See also

STOR_POFX_DEVICE

StorPortInitializePoFxPower

StorPortPoFxActivateComponent