StorPortInvokeAcpiMethod routine

The StorPortInvokeAcpiMethod routine executes an ACPI method for a storage device.

Syntax


ULONG StorPortInvokeAcpiMethod(
  _In_       PVOID HwDeviceExtension,
  _In_opt_   PSTOR_ADDRESS Address,
  _In_       ULONG MethodName,
  _In_opt_   PVOID InputBuffer,
  _In_       ULONG InputBufferLength,
  _In_opt_   PVOID OutputBuffer,
  _In_       ULONG OutputBufferLength,
  _Out_opt_  PULONG BytesReturned
);

Parameters

HwDeviceExtension [in]

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

Address [in, optional]

The address of the target device. This parameter is optional. If Address is set to NULL, the adapter is the target.

MethodName [in]

A four-byte name for the ACPI method. For example, ((ULONG) 'DDS_') would name the _SDD, or 'Set Device Data', ACPI method for an AHCI controller.

InputBuffer [in, optional]

A pointer to the input data to the method.

InputBufferLength [in]

The length, in bytes, of the buffer in InputBuffer.

OutputBuffer [in, optional]

A pointer to the output data from the method.

OutputBufferLength [in]

The length, in bytes, of the buffer in OutputBuffer.

BytesReturned [out, optional]

A pointer to the length, in bytes, of the data returned in OutputBuffer.

Return value

The StorPortInvokeAcpiMethod routine returns one of these status codes:

Return codeDescription
STOR_STATUS_INVALID_UNSUCCESSFUL

A general error condition exists.

STOR_STATUS_INVALID_PARAMETER

HwDeviceExtension, InputBuffer, or OutputBuffer is NULL.

-or-

Address refers to a target that does not exist.

STOR_STATUS_NOT_IMPLEMENTED

The ACPI method is not implemented.

STOR_STATUS_INSUFFICIENT_RESOURCES

Insufficient resources are available to execute the method, or OutputBufferLength is not large enough for the returned data.

STOR_STATUS_INVALID_IRQL

Current IRQL > DISPATCH_LEVEL.

STOR_STATUS_SUCCESS

The method executed successfully.

 

Remarks

The StorPortInvokeAcpiMethod enables a miniport driver to invoke ACPI methods defined for storage controllers and storage LUNs. The method names are four-byte character strings that occupy a ULONG value in MethodName.

Requirements

Version

Available in Windows 8 and later versions of Windows.

Header

Storport.h (include Storport.h)

IRQL

<= DISPATCH_LEVEL

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft