diff mbox series

[edk2,v2,1/5] MdeModuelPkg/UfsPassThruDxe: fix to identify 32 bits address mode

Message ID 1484569378-16126-2-git-send-email-haojian.zhuang@linaro.org
State Accepted
Commit a2e3feb687c9ee13d17fd319bf58f6e752225495
Headers show
Series fix UFS driver | expand

Commit Message

Haojian Zhuang Jan. 16, 2017, 12:22 p.m. UTC
When UFS_HC_CAP_64ADDR bit is set, it means 64-bit address,
not 32-bit address.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>

Reviewed-by: Feng Tian <feng.tian@intel.com>

---
 MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.7.4

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox series

Patch

diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
index 3bd6dad..2b95f80 100644
--- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
+++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
@@ -1749,9 +1749,9 @@  UfsAllocateAlignCommonBuffer (
   EDKII_UFS_HOST_CONTROLLER_PROTOCOL   *UfsHc;
 
   if ((Private->Capabilities & UFS_HC_CAP_64ADDR) == UFS_HC_CAP_64ADDR) {
-    Is32BitAddr = TRUE;
-  } else {
     Is32BitAddr = FALSE;
+  } else {
+    Is32BitAddr = TRUE;
   }
 
   UfsHc  = Private->UfsHostController;