Bewerken

Delen via


StorPortInvokeAcpiMethod function (storport.h)

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

Syntax

ULONG StorPortInvokeAcpiMethod(
  [in]            PVOID         HwDeviceExtension,
  [in, optional]  PSTOR_ADDRESS Address,
  [in]            ULONG         MethodName,
  [in, optional]  PVOID         InputBuffer,
  [in]            ULONG         InputBufferLength,
  [in, optional]  PVOID         OutputBuffer,
  [in]            ULONG         OutputBufferLength,
  [out, optional] PULONG        BytesReturned
);

Parameters

[in] HwDeviceExtension

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

[in, optional] Address

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

[in] MethodName

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.

[in, optional] InputBuffer

A pointer to the input data to the method.

[in] InputBufferLength

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

[in, optional] OutputBuffer

A pointer to the output data from the method.

[in] OutputBufferLength

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

[out, optional] BytesReturned

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 code Description
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 > PASSIVE_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

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