From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: Haojian Zhuang 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: [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: , X-List-Received-Date: Fri, 06 Jan 2017 06:52:35 -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/UfsPassThruDxe/UfsPassThruHci.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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; } -- 2.7.4