Theory of Operation
R
SATA Programmer’s Reference Manual
41
// if not successful, the control method probably does not
// exists or APM mode is being used
//
if( NT_SUCCESS( status)) {
//
// make sure we received the correct data type back
//
if( pOutputBuffer->Argument[ 0].Type != ACPI_METHOD_ARGUMENT_INTEGER)
status = STATUS_DATA_ERROR;
else
// Port status is here
*pdwStatus = pOutputBuffer->Argument[ 0].Argument;
}
return( status);
}
//
// SendIrp - Send Irp to ACPI
//
// Entry:
// Pdo ==> target of the request
// Ioctl ==> the request
// InputBuffer ==> ptr to input parameters
// InputSize ==> size of InputBuffer
// OutputBuffer ==> ptr to receive results
// OutputSize ==> size of OutputBuffer
//
// Exit:
// Returns status code.
// OutputBuffer <== indeterminent
//
NTSTATUS
SendIRP( IN PDEVICE_OBJECT Pdo, IN ULONG Ioctl, IN PVOID InputBuffer,
IN ULONG InputSize, IN PACPI_EVAL_OUTPUT_BUFFER OutputBuffer,
IN ULONG OutputSize)
{
IO_STATUS_BLOCK ioBlock;
KEVENT evIoctl;
NTSTATUS status;
PIRP
Irp;
PIO_STACK_LOCATION pIrpStack;
// Initialize an event to wait upon
KeInitializeEvent( &evIoctl, SynchronizationEvent, FALSE);
// Build the request
Summary of Contents for 82801EB
Page 6: ...R 6 SATA Programmer s Reference Manual This page is intentionally left blank...
Page 8: ...Introduction R 8 SATA Programmer s Reference Manual This page is intentionally left blank...
Page 10: ...Conventions R 10 SATA Programmer s Reference Manual This page is intentionally left blank...
Page 59: ...Theory of Operation R SATA Programmer s Reference Manual 59...