Theory of Operation
R
40
SATA Programmer’s Reference Manual
.
.
.
}
#define
SATA_GET_PORT_STATUS 'SPSG' // Control method to execute
//
// SATA_CheckPortStatus - Get the SATA port status
//
// Entry:
// pDO ==> pointer to our physical device object
// 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,
// this logical channel's PDO
IOCTL_ACPI_EVAL_METHOD,
pInputBuffer,
// ptr to input buffer
sizeof( ACPI_EVAL_INPUT_BUFFER),
// its size
pOutputBuffer,
// ptr to output buffer
sizeof( ACPI_EVAL_OUTPUT_BUFFER);
// its size
//
Содержание 82801EB
Страница 6: ...R 6 SATA Programmer s Reference Manual This page is intentionally left blank...
Страница 8: ...Introduction R 8 SATA Programmer s Reference Manual This page is intentionally left blank...
Страница 10: ...Conventions R 10 SATA Programmer s Reference Manual This page is intentionally left blank...
Страница 30: ...Theory of Operation R 30 SATA Programmer s Reference Manual This page is intentionally left blank...
Страница 46: ...Theory of Operation R 46 SATA Programmer s Reference Manual This page is intentionally left blank...
Страница 59: ...Theory of Operation R SATA Programmer s Reference Manual 59...