From patchwork Mon Jan 16 12:22:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 91565 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1395396qgi; Mon, 16 Jan 2017 04:23:14 -0800 (PST) X-Received: by 10.98.3.7 with SMTP id 7mr37616000pfd.9.1484569394004; Mon, 16 Jan 2017 04:23:14 -0800 (PST) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id v66si21432219pfd.284.2017.01.16.04.23.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Jan 2017 04:23:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; 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 198.145.21.10 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 2603C81D97; Mon, 16 Jan 2017 04:23:13 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-pg0-x236.google.com (mail-pg0-x236.google.com [IPv6:2607:f8b0:400e:c05::236]) (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 E3FEC81D97 for ; Mon, 16 Jan 2017 04:23:11 -0800 (PST) Received: by mail-pg0-x236.google.com with SMTP id 204so15493352pge.0 for ; Mon, 16 Jan 2017 04:23:12 -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=PNdqGwJgeMJ4qMHv+SpvX0ISA2WEvJ1Fefdvsp3eb+g=; b=Tj+qMqzoYRDcgvf/XVS9AIo6le27vU6fme0xzmTibMFfxvE8HtOHLE0tplJ/op1uWn XzyithoiEcVCEAmzjw6jEoWsqY3QOKEbi78TTYU2iw7ecw+W/ses2Ueuvc3yDqGlEGs9 wYAK0nD4bOZ8mWhxlDf+HL1A4wNF/IlJIyMe4= 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=PNdqGwJgeMJ4qMHv+SpvX0ISA2WEvJ1Fefdvsp3eb+g=; b=j3PaYDG7Sp9w3vYGhwHuMcAXb75/OP7rFyQiupIHi6bFdCVvpg3W8MC5BA+7Agz9re 1joFAn8U4cs8s7A7k3HWnRWhYDa+IOm0t4Q7kB39Fg7O622FGINhR+LoEsdUc6LV5KrM gtolypO7AlJ5BWN6x3QtARVPFGMIeaY9oBtpS5Kd8r9GoNQs5DeFywxjD5noOUk42gop Sd6hAWYRAvY4EgBDP4vH32MeofHlpumKKggd+ZnwbpXOWpjXMaV8Lj09yjz4cfnXaj50 qB5vfRxBeMflqiYlV7VTwZyiRl8ZvwWhOp5m7ZefC2kasNb0r1As3bVu/+lYDYlrSteA 62xA== X-Gm-Message-State: AIkVDXIuTWzI0Bue3QbmQ1Un6ROyFezjqV7pJhVZ88Km+0+YChmo0E7NlG/knBuA/InthEEE X-Received: by 10.84.239.16 with SMTP id w16mr15928776plk.73.1484569392102; Mon, 16 Jan 2017 04:23:12 -0800 (PST) Received: from localhost.localdomain ([45.56.159.104]) by smtp.gmail.com with ESMTPSA id v186sm10361286pgv.44.2017.01.16.04.23.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Jan 2017 04:23:11 -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:55 +0800 Message-Id: <1484569378-16126-3-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 2/5] MdeModulePkg/UfsPassThruDxe: 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 Reviewed-by: Feng Tian --- 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 2b95f80..3793c6a 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; }