From patchwork Mon Jan 16 12:22:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 91567 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1395433qgi; Mon, 16 Jan 2017 04:23:19 -0800 (PST) X-Received: by 10.98.77.67 with SMTP id a64mr37193659pfb.124.1484569399270; Mon, 16 Jan 2017 04:23:19 -0800 (PST) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id a5si3563398pgg.89.2017.01.16.04.23.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Jan 2017 04:23:19 -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 645B281D9D; Mon, 16 Jan 2017 04:23:18 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-pg0-x22d.google.com (mail-pg0-x22d.google.com [IPv6:2607:f8b0:400e:c05::22d]) (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 95CA681CCC for ; Mon, 16 Jan 2017 04:23:17 -0800 (PST) Received: by mail-pg0-x22d.google.com with SMTP id 14so15479644pgg.1 for ; Mon, 16 Jan 2017 04:23:18 -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=0zOYAsnmYPHR67n4Ex9K9aWU+QblTkJx6Wr1vqbgw04=; b=UExkrD+7REwkfhydYslSpBONh4upcJAn+BapdgYIPkT0k4maKNz6u9/VUuLQAtjPnb GowGSntLCGbauROQ5OZbNI+wrLYEgRQynFln8OmlhAo6d84YXG0ePGSvJv6wQGPoS1Ag JYPtID3fR9+WQNUsRxtCIaRCarw0tMKnDs2xI= 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=0zOYAsnmYPHR67n4Ex9K9aWU+QblTkJx6Wr1vqbgw04=; b=BXdvv4M8pdiWrWyIXNivyrpVafeuzS95WITTn/0EoAsHIUkXY5RSbPr+a6T3n6lGTr TzBvo5eWK7PNib0ckfMb40cftEYB5CB3Hl5EmawTn/jMap4MvfeTYKKscQ0P+vigdkqT O5sz5P2w9fM4XF1a9wyMQCUazBo6VG/I6tqlXaPDeyG7zEtPJMp61eoYswKLvyyD8DDC +UuOsCUVzElUJ53lo2CLgfGz9LScjkvRQQwNRSr4vs4P8aPpMbx7v0mDTerz/4bajp5w BeYv7JrCkui1KN0zYnLzpHho0fiLHmng+hKazgpi8FdNBcgtKFFLqYn4ridfI75xHaur YREw== X-Gm-Message-State: AIkVDXJfwwQSZFuvqfI1rxwqRs6ugupf3UifbIQygts//btm0DzRZomu938gqEJGu8O9HlJ7 X-Received: by 10.84.208.102 with SMTP id f35mr50077348plh.137.1484569397566; Mon, 16 Jan 2017 04:23:17 -0800 (PST) Received: from localhost.localdomain ([45.56.159.104]) by smtp.gmail.com with ESMTPSA id v186sm10361286pgv.44.2017.01.16.04.23.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Jan 2017 04:23:17 -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:57 +0800 Message-Id: <1484569378-16126-5-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 4/5] MdeModulePkg/UfsPassThruDxe: fix initialize OCS value to 0x0F 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" The OCS value should be initiliazed as 0x0F according to UFS spec. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang Reviewed-by: Feng Tian --- MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c | 2 ++ 1 file changed, 2 insertions(+) -- 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 3793c6a..9432c63 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c @@ -551,6 +551,7 @@ UfsCreateScsiCommandDesc ( Trd->Int = UFS_INTERRUPT_COMMAND; Trd->Dd = DataDirection; Trd->Ct = UFS_STORAGE_COMMAND_TYPE; + Trd->Ocs = 0x0F; Trd->UcdBa = (UINT32)RShiftU64 ((UINT64)CmdDescPhyAddr, 7); Trd->UcdBaU = (UINT32)RShiftU64 ((UINT64)CmdDescPhyAddr, 32); Trd->RuL = (UINT16)DivU64x32 ((UINT64)ROUNDUP8 (sizeof (UTP_RESPONSE_UPIU)), sizeof (UINT32)); @@ -719,6 +720,7 @@ UfsCreateNopCommandDesc ( Trd->Int = UFS_INTERRUPT_COMMAND; Trd->Dd = 0x00; Trd->Ct = UFS_STORAGE_COMMAND_TYPE; + Trd->Ocs = 0x0F; Trd->UcdBa = (UINT32)RShiftU64 ((UINT64)CmdDescPhyAddr, 7); Trd->UcdBaU = (UINT32)RShiftU64 ((UINT64)CmdDescPhyAddr, 32); Trd->RuL = (UINT16)DivU64x32 ((UINT64)ROUNDUP8 (sizeof (UTP_NOP_IN_UPIU)), sizeof (UINT32));