]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/UfsPassThruDxe: fix the bit in UFS_HC_UTRLDBR_OFFSET reg
authorHaojian Zhuang <haojian.zhuang@linaro.org>
Mon, 16 Jan 2017 12:22:55 +0000 (20:22 +0800)
committerFeng Tian <feng.tian@intel.com>
Fri, 20 Jan 2017 01:11:24 +0000 (09:11 +0800)
When UPIU packet is sent, (BIT0 << Slot) should be set according
to context.  But BIT0 is used without Slot when UfsWaitMemSet ()
is invoked.

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

index 2b95f809c74dca013bf0d0c04bf404f1fae25760..3793c6a0ba4283e27013fe0e4135ccb8e407f933 100644 (file)
@@ -954,7 +954,7 @@ UfsRwDeviceDesc (
   //\r
   // Wait for the completion of the transfer request.\r
   //  \r
-  Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0, 0, Packet.Timeout);\r
+  Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0 << Slot, 0, Packet.Timeout);\r
   if (EFI_ERROR (Status)) {\r
     goto Exit;\r
   }\r
@@ -1077,7 +1077,7 @@ UfsRwAttributes (
   //\r
   // Wait for the completion of the transfer request.\r
   //  \r
-  Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0, 0, Packet.Timeout);\r
+  Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0 << Slot, 0, Packet.Timeout);\r
   if (EFI_ERROR (Status)) {\r
     goto Exit;\r
   }\r
@@ -1201,7 +1201,7 @@ UfsRwFlags (
   //\r
   // Wait for the completion of the transfer request.\r
   //  \r
-  Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0, 0, Packet.Timeout);\r
+  Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0 << Slot, 0, Packet.Timeout);\r
   if (EFI_ERROR (Status)) {\r
     goto Exit;\r
   }\r
@@ -1368,7 +1368,7 @@ UfsExecNopCmds (
   //\r
   // Wait for the completion of the transfer request.\r
   //  \r
-  Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0, 0, UFS_TIMEOUT);\r
+  Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0 << Slot, 0, UFS_TIMEOUT);\r
   if (EFI_ERROR (Status)) {\r
     goto Exit;\r
   }\r
@@ -1534,7 +1534,7 @@ UfsExecScsiCmds (
   //\r
   // Wait for the completion of the transfer request.\r
   // \r
-  Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0, 0, Packet->Timeout);\r
+  Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0 << TransReq->Slot, 0, Packet->Timeout);\r
   if (EFI_ERROR (Status)) {\r
     goto Exit;\r
   }\r