HW_STATE_CHANGE callback function (storport.h)

A miniport-provided callback that is called after a notification from StorPortStateChangeDetected is processed.

Syntax

HW_STATE_CHANGE HwStateChange;

void HwStateChange(
                 PVOID HwDeviceExtension,
  [in, optional] PVOID Context,
  [in]           SHORT AddressType,
  [in]           PVOID Address,
  [in]           ULONG Status
)
{...}

Parameters

HwDeviceExtension

[in] A pointer to the miniport driver's per-HBA storage area.

[in, optional] Context

The context supplied as HwStateChangeContext by the miniport in the call to StorPortStateChangeDetected.

[in] AddressType

The type of the address in Address.

[in] Address

A pointer to a STOR_ADDRESS structure for the entity whose state change was processed.

[in] Status

The processing status for the state change notification.

Return value

None

Remarks

The HwStorStateChange is called with the StartIo lock acquired by Storport.

This callback enables miniports to do any additional processing that is needed after hardware addition or removal. If a hardware change occurs on the HBA port or bus, the miniport can call StorPortStateChangeDetected to alert the system of the event.

If the value for Status is < 0x80000000, then the notification processing was successful. Otherwise, the notification process failed.

The name HwStorStateChange is just a placeholder for the miniport function that is pointed to by the HwStateChange parameter of StorPortStateChangeDetected. The actual prototype of this routine is defined in Storport.h as follows:

typedef
VOID
HW_STATE_CHANGE (
    _In_ PVOID HwDeviceExtension,
    _In_opt_ PVOID Context,
    _In_ SHORT AddressType,
    _In_ PVOID Address,
    _In_ ULONG Status
    );

Requirements

Requirement Value
Minimum supported client Available in Windows 8 and later versions of Windows.
Target Platform Universal
Header storport.h (include Storport.h)
IRQL DISPATCH

See also

STOR_ADDRESS

StorPortStateChangeDetected