From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: Haojian Zhuang 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: [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: , X-List-Received-Date: Mon, 16 Jan 2017 12:23:17 -0000 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(+) 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)); -- 2.7.4