From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-x231.google.com (mail-pf0-x231.google.com [IPv6:2607:f8b0:400e:c00::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 91FFE81D98 for ; Mon, 16 Jan 2017 04:23:14 -0800 (PST) Received: by mail-pf0-x231.google.com with SMTP id 189so53509721pfu.3 for ; Mon, 16 Jan 2017 04:23:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=q2hLrSHMu2Nxb2+7pFugpLiRVBfoG56uaefoGz9hypE=; b=Od0mjOsuZTAKyZjgdO7QGn430La+2KqSzHTFT3bx+7pC0KWYBcottXWzNBoW5VJm98 bujmxb/KqlGY48OV2/OmGaMISNZNDso8xFakCYfqEED7j5iqBrZ3IcCdpQv1SdX3WhP5 bMV1EvqwfPx4+FlGdYFO8WNyO1dePaT8wKVWw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=q2hLrSHMu2Nxb2+7pFugpLiRVBfoG56uaefoGz9hypE=; b=N7NIu8+0HaH5X9HZ2a1ue2iukyVklUmn8bej8/SOniGi460ImC4Hu9l9sMC9DH4S3y UJYTbhws0PFjGyAZajOO5h4MeDCEMKUALFShD1jshJVNALlHvAno6jrkD/Al5E1CVFsj BBcxq10Y2N0gWKXBjHI41vdAhnRP1Av0NGlS5Uuzh/T7/+nB6ohSic6PifETxBkJq2L+ KEXpi6U+c8bKFZYJcfFKgEyHBzPR3SR0C5LshafkdN6eSYCWRU8n2LjTDBMv/gTrWjFY kjpaoFrr8vcsrm4mmKQdt8dgKE3BimutG7ImNTng/bASvdl+0eKOeGx3BlV9yRfW6Ucg EMfg== X-Gm-Message-State: AIkVDXLkC2MdxVMbyHaNkW9tilYeegX9FkzqV6iittnvZYmXRl5MJvQtBA/OKxjZbEsvH+5U X-Received: by 10.84.202.163 with SMTP id x32mr50224850pld.46.1484569394805; Mon, 16 Jan 2017 04:23:14 -0800 (PST) Received: from localhost.localdomain ([45.56.159.104]) by smtp.gmail.com with ESMTPSA id v186sm10361286pgv.44.2017.01.16.04.23.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Jan 2017 04:23:14 -0800 (PST) From: Haojian Zhuang To: feng.tian@intel.com, leif.lindholm@linaro.org, ard.biesheuvel@linaro.org, edk2-devel@lists.01.org Cc: Haojian Zhuang Date: Mon, 16 Jan 2017 20:22:56 +0800 Message-Id: <1484569378-16126-4-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484569378-16126-1-git-send-email-haojian.zhuang@linaro.org> References: <1484569378-16126-1-git-send-email-haojian.zhuang@linaro.org> Subject: [PATCH v2 3/5] MdeModulePkg/UfsBlockIoPei: fix the bit in UFS_HC_UTRLDBR_OFFSET reg X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2017 12:23:14 -0000 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 --- 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