Appendix A - Coding Examples; Enabling/Disabling Sata Ports From A Wdm Driver - Intel 82801EB Programmer's Reference Manual

Serial ata controller
Table of Contents

Advertisement

R
Appendix A – Coding Examples
A.1

Enabling/Disabling SATA Ports from a WDM Driver

.
.
.
//
// Function Proto for Reading and Writing to device configuration space
//
NTSTATUS ReadWriteConfigSpace( PDEVICE_OBJECT pDO, BOOLEAN fRead, PVOID pBuf,
//
//
// This example illustrates how a WDM driver could read/write the PCS.PxE bits for
// enabling or disabling the SATA port(s).
//
// This example assumes direct access to the SATA PCI Configuration space
//
//
// Disable the ports. For simplicity, we don't do any status checking
//
BYTE val = 0; // to disable both ports
ReadWriteConfigSpace( pDO, TRUE, &val, 0x92, sizeof( val));
.
.
.
//
// Enable the ports. For simplicity, we don't do any status checking
//
BYTE val = 3; // to enable both ports
ReadWriteConfigSpace( pDO, FALSE, &val, 0x92, sizeof( val));
.
.
.
//
// Enable only port 0. For simplicity, we don't do any status
// checking
//
BYTE val;
SATA Programmer's Reference Manual
ULONG Offset, ULONG Length);
Theory of Operation
31

Advertisement

Table of Contents
loading

This manual is also suitable for:

82801erIch5Ich5r

Table of Contents