From patchwork Fri Jan 6 06:52:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 90114 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp9321478qgi; Thu, 5 Jan 2017 22:52:37 -0800 (PST) X-Received: by 10.84.210.8 with SMTP id z8mr150276692plh.94.1483685557605; Thu, 05 Jan 2017 22:52:37 -0800 (PST) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id o2si42049998pfg.18.2017.01.05.22.52.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jan 2017 22:52:37 -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 dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 38102818F4; Thu, 5 Jan 2017 22:52:37 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-pg0-x22b.google.com (mail-pg0-x22b.google.com [IPv6:2607:f8b0:400e:c05::22b]) (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 CD4328185B for ; Thu, 5 Jan 2017 22:52:35 -0800 (PST) Received: by mail-pg0-x22b.google.com with SMTP id f188so248938980pgc.3 for ; Thu, 05 Jan 2017 22:52:35 -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=+LTBxWH6iSYRbDrxnFyrloswgr4ebXV/ZZHVPX86zCw=; b=FojLH8pBorM3yndaGWnDlYSMfzDRyICgapqVL8hEa58NqLSOE+IhjOsPRimAKoeWMs BM8Qmi6Kcyq+Bz+8Lm9562wfqC8rrQ73WVG9Kl/HyIObiRPpYI09WKLzw7Iz6I6rTk+u YiUTOkLiTID8vApHitoq/w3F9PpsucD2qP8BA= 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=+LTBxWH6iSYRbDrxnFyrloswgr4ebXV/ZZHVPX86zCw=; b=Bo6HXPTf2k7PKcbxxXFAf4NRyn7etqN1rJC2TnmzI/FmtLdXGq6YGW0Hp0q+3gjwYI T8wth0dnDY6EWO6fqlaBbndNvN4jMWvMskvBEltBZOEJCnIinDJw/77/gYBr7Tjfptj7 A1SUWCB1aQIZM1YcsZAqS7efpGZMtU2TTF5LCEwUE8di3YKh0xgOTUIuB1p+maFBJezb T0SRVb7VZESHX0V+9aReplGtiFh27h+0oIMnIkscBXrUH8Po68Vs8Du7482GJt8z5p5/ hSjamcBRebkwsjKoqrzhE90BufCZRQiom2Pok9fbSzwGwmkHF+vIuArYW0UqFGhdxj3o DXeA== X-Gm-Message-State: AIkVDXIY3Ze8HnZAehX4EsaDP+kIZHN7WS4jju8o0VJtQdCczKpeuvX5pgVWfXKtVUCXqR1O X-Received: by 10.84.231.2 with SMTP id f2mr16152377plk.28.1483685555444; Thu, 05 Jan 2017 22:52:35 -0800 (PST) Received: from localhost.localdomain ([45.56.159.83]) by smtp.gmail.com with ESMTPSA id p13sm159096976pgf.47.2017.01.05.22.52.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Jan 2017 22:52:35 -0800 (PST) From: Haojian Zhuang To: feng.tian@intel.com, leif.lindholm@linaro.org, ard.biesheuvel@linaro.org, edk2-devel@lists.01.org Date: Fri, 6 Jan 2017 14:52:12 +0800 Message-Id: <1483685538-11058-4-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1483685538-11058-1-git-send-email-haojian.zhuang@linaro.org> References: <1483685538-11058-1-git-send-email-haojian.zhuang@linaro.org> Subject: [edk2] [PATCH 3/9] Ufs: fix the bit in UFS_HC_UTRLDBR_OFFSET register 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/UfsPassThruDxe/UfsPassThruHci.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/UfsPassThruDxe/UfsPassThruHci.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c index f160d6a..e556b62 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c @@ -954,7 +954,7 @@ UfsRwDeviceDesc ( // // Wait for the completion of the transfer request. // - Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0, 0, Packet.Timeout); + Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0 << Slot, 0, Packet.Timeout); if (EFI_ERROR (Status)) { goto Exit; } @@ -1077,7 +1077,7 @@ UfsRwAttributes ( // // Wait for the completion of the transfer request. // - Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0, 0, Packet.Timeout); + Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0 << Slot, 0, Packet.Timeout); if (EFI_ERROR (Status)) { goto Exit; } @@ -1201,7 +1201,7 @@ UfsRwFlags ( // // Wait for the completion of the transfer request. // - Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0, 0, Packet.Timeout); + Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0 << Slot, 0, Packet.Timeout); if (EFI_ERROR (Status)) { goto Exit; } @@ -1368,7 +1368,7 @@ UfsExecNopCmds ( // // Wait for the completion of the transfer request. // - Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0, 0, UFS_TIMEOUT); + Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0 << Slot, 0, UFS_TIMEOUT); if (EFI_ERROR (Status)) { goto Exit; } @@ -1534,7 +1534,7 @@ UfsExecScsiCmds ( // // Wait for the completion of the transfer request. // - Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0, 0, Packet->Timeout); + Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0 << TransReq->Slot, 0, Packet->Timeout); if (EFI_ERROR (Status)) { goto Exit; }