From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: Haojian Zhuang 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: [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: , X-List-Received-Date: Mon, 16 Jan 2017 12:23:12 -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 Reviewed-by: Feng Tian --- 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 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; } -- 2.7.4