public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Haojian Zhuang <haojian.zhuang@linaro.org>
To: feng.tian@intel.com, leif.lindholm@linaro.org,
	ard.biesheuvel@linaro.org, edk2-devel@lists.01.org
Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
Subject: [PATCH v2 3/5] MdeModulePkg/UfsBlockIoPei: fix the bit in UFS_HC_UTRLDBR_OFFSET reg
Date: Mon, 16 Jan 2017 20:22:56 +0800	[thread overview]
Message-ID: <1484569378-16126-4-git-send-email-haojian.zhuang@linaro.org> (raw)
In-Reply-To: <1484569378-16126-1-git-send-email-haojian.zhuang@linaro.org>

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>
---
 MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c
index 7e90ecf..cccacce 100644
--- a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c
+++ b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c
@@ -842,7 +842,7 @@ UfsRwDeviceDesc (
   // Wait for the completion of the transfer request.
   //  
   Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET;  
-  Status = UfsWaitMemSet (Address, BIT0, 0, Packet.Timeout);
+  Status = UfsWaitMemSet (Address, BIT0 << Slot, 0, Packet.Timeout);
   if (EFI_ERROR (Status)) {
     goto Exit;
   }
@@ -956,7 +956,7 @@ UfsRwAttributes (
   // Wait for the completion of the transfer request.
   //  
   Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET;  
-  Status = UfsWaitMemSet (Address, BIT0, 0, Packet.Timeout);
+  Status = UfsWaitMemSet (Address, BIT0 << Slot, 0, Packet.Timeout);
   if (EFI_ERROR (Status)) {
     goto Exit;
   }
@@ -1070,7 +1070,7 @@ UfsRwFlags (
   // Wait for the completion of the transfer request.
   //  
   Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET;  
-  Status = UfsWaitMemSet (Address, BIT0, 0, Packet.Timeout);
+  Status = UfsWaitMemSet (Address, BIT0 << Slot, 0, Packet.Timeout);
   if (EFI_ERROR (Status)) {
     goto Exit;
   }
@@ -1228,7 +1228,7 @@ UfsExecNopCmds (
   // Wait for the completion of the transfer request.
   //  
   Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET;  
-  Status = UfsWaitMemSet (Address, BIT0, 0, UFS_TIMEOUT);
+  Status = UfsWaitMemSet (Address, BIT0 << Slot, 0, UFS_TIMEOUT);
   if (EFI_ERROR (Status)) {
     goto Exit;
   }
@@ -1312,7 +1312,7 @@ UfsExecScsiCmds (
   // Wait for the completion of the transfer request.
   //  
   Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET;  
-  Status = UfsWaitMemSet (Address, BIT0, 0, Packet->Timeout);
+  Status = UfsWaitMemSet (Address, BIT0 << Slot, 0, Packet->Timeout);
   if (EFI_ERROR (Status)) {
     goto Exit;
   }
-- 
2.7.4



  parent reply	other threads:[~2017-01-16 12:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16 12:22 [PATCH v2 0/5] fix UFS driver Haojian Zhuang
2017-01-16 12:22 ` [PATCH v2 1/5] MdeModuelPkg/UfsPassThruDxe: fix to identify 32 bits address mode Haojian Zhuang
2017-01-16 12:22 ` [PATCH v2 2/5] MdeModulePkg/UfsPassThruDxe: fix the bit in UFS_HC_UTRLDBR_OFFSET reg Haojian Zhuang
2017-01-16 12:22 ` Haojian Zhuang [this message]
2017-01-16 12:22 ` [PATCH v2 4/5] MdeModulePkg/UfsPassThruDxe: fix initialize OCS value to 0x0F Haojian Zhuang
2017-01-16 12:22 ` [PATCH v2 5/5] MdeModulePkg/UfsBlockIoPei: " Haojian Zhuang
2017-01-16 16:02   ` Leif Lindholm
2017-01-17  2:06     ` Tian, Feng
2017-01-17 10:56       ` Leif Lindholm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1484569378-16126-4-git-send-email-haojian.zhuang@linaro.org \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox