This file implements ATA_PASSTHRU_PROCTOCOL and EXT_SCSI_PASSTHRU_PROTOCOL interfaces\r
for managed ATA controllers.\r
\r
- Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
0xFF, 0xFF, 0xFF, 0xFF\r
};\r
\r
+EDKII_ATA_ATAPI_POLICY_PROTOCOL *mAtaAtapiPolicy;\r
+EDKII_ATA_ATAPI_POLICY_PROTOCOL mDefaultAtaAtapiPolicy = {\r
+ EDKII_ATA_ATAPI_POLICY_VERSION,\r
+ 2, // PuisEnable\r
+ 0, // DeviceSleepEnable\r
+ 0, // AggressiveDeviceSleepEnable\r
+ 0 // Reserved\r
+};\r
+\r
/**\r
Sends an ATA command to an ATA device that is attached to the ATA controller. This function\r
supports both blocking I/O and non-blocking I/O. The blocking I/O functionality is required,\r
goto ErrorExit;\r
}\r
\r
+ Status = gBS->LocateProtocol (&gEdkiiAtaAtapiPolicyProtocolGuid, NULL, (VOID **)&mAtaAtapiPolicy);\r
+ if (EFI_ERROR (Status)) {\r
+ //\r
+ // If there is no AtaAtapiPolicy exposed, use the default policy.\r
+ //\r
+ mAtaAtapiPolicy = &mDefaultAtaAtapiPolicy;\r
+ }\r
+\r
//\r
// Allocate a buffer to store the ATA_ATAPI_PASS_THRU_INSTANCE data structure\r
//\r