/** @file\r
The file for AHCI mode of ATA host controller.\r
\r
- Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2010 - 2012, 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
IN UINT8 AtapiCommandLength,\r
IN UINT8 CommandSlotNumber,\r
IN OUT VOID *DataPhysicalAddr,\r
- IN UINT64 DataLength\r
+ IN UINT32 DataLength\r
)\r
{\r
UINT64 BaseAddr;\r
- UINT64 PrdtNumber;\r
- UINT64 PrdtIndex;\r
+ UINT32 PrdtNumber;\r
+ UINT32 PrdtIndex;\r
UINTN RemainedData;\r
UINTN MemAddr;\r
DATA_64 Data64;\r
\r
RemainedData = (UINTN) DataLength;\r
MemAddr = (UINTN) DataPhysicalAddr;\r
- CommandList->AhciCmdPrdtl = (UINT32)PrdtNumber;\r
+ CommandList->AhciCmdPrdtl = PrdtNumber;\r
\r
for (PrdtIndex = 0; PrdtIndex < PrdtNumber; PrdtIndex++) {\r
if (RemainedData < EFI_AHCI_MAX_DATA_PER_PRDT) {\r
//\r
// If the device is a hard disk, then try to enable S.M.A.R.T feature\r
//\r
- if (DeviceType == EfiIdeHarddisk) {\r
+ if ((DeviceType == EfiIdeHarddisk) && PcdGetBool (PcdAtaSmartEnable)) {\r
AhciAtaSmartSupport (\r
PciIo,\r
AhciRegisters,\r