StorPortSetUnitAttributes routine

The StorPortSetUnitAttributes routine registers the power attributes of a storage unit device with the Storport driver.

Syntax


ULONG StorPortSetUnitAttributes(
  _In_ PVOID                HwDeviceExtension,
  _In_ PSTOR_ADDRESS        Address,
  _In_ STOR_UNIT_ATTRIBUTES Attributes
);

Parameters

HwDeviceExtension [in]

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

Address [in]

The storage unit device address. This parameter must not be NULL.

Attributes [in]

A set of bitfields indicating the attributes supported for the unit device.

Return value

StorPortSetUnitAttributes returns one of the following status codes:

Return codeDescription
STOR_STATUS_SUCCESS

Indicates that the routine set the unit attributes successfully.

STOR_STATUS_INVALID_PARAMETER

The HwDeviceExtension pointer is NULL.

-or-

One or more reserved bits in Attributes are set.

-or-

The unit address in Address is formatted incorrectly.

-or-

A unit device is not found for the address given in Address.

 

Remarks

A miniport driver will call this routine to register the unit attributes with Storport during completion of an SRB containing a SCSIOP_INQUIRY command request. The bitfields in attributes are set based on the data returned from the adapter for the inquiry command. Storport will issue an inquiry for the unit at Address during a bus enumeration.

Requirements

Target platform

Version

Available starting with Windows 8.

Header

Storport.h (include Storport.h)

IRQL

Any

See also

STOR_ADDRESS
STOR_UNIT_ATTRIBUTES

 

 

Send comments about this topic to Microsoft

Show: