From patchwork Mon Jan 16 12:22:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 91566 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1395416qgi; Mon, 16 Jan 2017 04:23:16 -0800 (PST) X-Received: by 10.99.52.11 with SMTP id b11mr39297240pga.131.1484569396146; Mon, 16 Jan 2017 04:23:16 -0800 (PST) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id f88si21455470pfk.36.2017.01.16.04.23.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Jan 2017 04:23:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 451D281D98; Mon, 16 Jan 2017 04:23:15 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org 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 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: [edk2] [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: , Cc: Haojian Zhuang MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel 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; }