]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/UfsBlockIoPei: fix the bit in UFS_HC_UTRLDBR_OFFSET reg
authorHaojian Zhuang <haojian.zhuang@linaro.org>
Mon, 16 Jan 2017 12:22:56 +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/UfsBlockIoPei/UfsHci.c

index 7e90ecf8e0198eef193d5de4ab3b17a47bdad867..cccacce334ef6f125814bbe986c89bb9bc3e7621 100644 (file)
@@ -842,7 +842,7 @@ UfsRwDeviceDesc (
   // Wait for the completion of the transfer request.\r
   //  \r
   Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET;  \r
-  Status = UfsWaitMemSet (Address, BIT0, 0, Packet.Timeout);\r
+  Status = UfsWaitMemSet (Address, BIT0 << Slot, 0, Packet.Timeout);\r
   if (EFI_ERROR (Status)) {\r
     goto Exit;\r
   }\r
@@ -956,7 +956,7 @@ UfsRwAttributes (
   // Wait for the completion of the transfer request.\r
   //  \r
   Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET;  \r
-  Status = UfsWaitMemSet (Address, BIT0, 0, Packet.Timeout);\r
+  Status = UfsWaitMemSet (Address, BIT0 << Slot, 0, Packet.Timeout);\r
   if (EFI_ERROR (Status)) {\r
     goto Exit;\r
   }\r
@@ -1070,7 +1070,7 @@ UfsRwFlags (
   // Wait for the completion of the transfer request.\r
   //  \r
   Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET;  \r
-  Status = UfsWaitMemSet (Address, BIT0, 0, Packet.Timeout);\r
+  Status = UfsWaitMemSet (Address, BIT0 << Slot, 0, Packet.Timeout);\r
   if (EFI_ERROR (Status)) {\r
     goto Exit;\r
   }\r
@@ -1228,7 +1228,7 @@ UfsExecNopCmds (
   // Wait for the completion of the transfer request.\r
   //  \r
   Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET;  \r
-  Status = UfsWaitMemSet (Address, BIT0, 0, UFS_TIMEOUT);\r
+  Status = UfsWaitMemSet (Address, BIT0 << Slot, 0, UFS_TIMEOUT);\r
   if (EFI_ERROR (Status)) {\r
     goto Exit;\r
   }\r
@@ -1312,7 +1312,7 @@ UfsExecScsiCmds (
   // Wait for the completion of the transfer request.\r
   //  \r
   Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET;  \r
-  Status = UfsWaitMemSet (Address, BIT0, 0, Packet->Timeout);\r
+  Status = UfsWaitMemSet (Address, BIT0 << Slot, 0, Packet->Timeout);\r
   if (EFI_ERROR (Status)) {\r
     goto Exit;\r
   }\r