summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c')
-rw-r--r--MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
index 26986cbf26..3bd6dade90 100644
--- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
+++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
@@ -2,7 +2,7 @@
UfsPassThruDxe driver is used to produce EFI_EXT_SCSI_PASS_THRU protocol interface
for upper layer application to execute UFS-supported SCSI cmds.
- Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -400,6 +400,11 @@ UfsInitUtpPrdt (
UINT8 *Remaining;
UINTN PrdtNumber;
+ if ((BufferSize & (BIT0 | BIT1)) != 0) {
+ BufferSize &= ~(BIT0 | BIT1);
+ DEBUG ((EFI_D_WARN, "UfsInitUtpPrdt: The BufferSize [%d] is not dword-aligned!\n", BufferSize));
+ }
+
if (BufferSize == 0) {
return EFI_SUCCESS;
}