Intel 82801EB Programmer's Reference Manual page 40

Serial ata controller
Table of Contents

Advertisement

Theory of Operation
.
.
.
}
#define SATA_GET_PORT_STATUS 'SPSG' // Control method to execute
//
// SATA_CheckPortStatus - Get the SATA port status
//
// Entry:
//
pDO
//
pdwStatus ==> ptr to receive port status value
//
// Exit:
//
Returns status code.
//
If success, pdwStatus has the SATA port status:
//
0 ==> No devices connected
//
1 ==> Master device present
//
2 ==> Slave device present
//
3 ==> Master and slave device present
//
-1 ==> Device presence unknown
//
NTSTATUS
SATA_CheckPortStatus( IN PDEVICE_OBJECT pDO, PDWORD pdwStatus)
{
NTSTATUS status = STATUS_SUCCESS;
PACPI_METHOD_ARGUMENT pArgBuf;
ACPI_EVAL_INPUT_BUFFER InputBuffer;
ACPI_EVAL_OUTPUT_BUFFER OutputBuffer;
//
// setup the request structure
//
InputBuffer->MethodNameAsUlong = SATA_GET_PORT_STATUS;
InputBuffer->Signature = ACPI_EVAL_INPUT_BUFFER_SIGNATURE;
//
// finally, do the request
//
status = SendIRP( pDO,
//
40
==> pointer to our physical device object
IOCTL_ACPI_EVAL_METHOD,
pInputBuffer,
sizeof( ACPI_EVAL_INPUT_BUFFER), // its size
pOutputBuffer,
sizeof( ACPI_EVAL_OUTPUT_BUFFER); // its size
// this logical channel's PDO
// ptr to input buffer
// ptr to output buffer
SATA Programmer's Reference Manual
R

Advertisement

Table of Contents
loading

This manual is also suitable for:

82801erIch5Ich5r

Table of Contents