From patchwork Fri Jan 6 06:52:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 90118 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp9321525qgi; Thu, 5 Jan 2017 22:52:48 -0800 (PST) X-Received: by 10.84.210.8 with SMTP id z8mr150277773plh.94.1483685568174; Thu, 05 Jan 2017 22:52:48 -0800 (PST) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id 77si78421042pgc.335.2017.01.05.22.52.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jan 2017 22:52:48 -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 dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C1993819E7; Thu, 5 Jan 2017 22:52:47 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-pf0-x231.google.com (mail-pf0-x231.google.com [IPv6:2607:f8b0:400e:c00::231]) (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 DAA37819E7 for ; Thu, 5 Jan 2017 22:52:46 -0800 (PST) Received: by mail-pf0-x231.google.com with SMTP id 189so92294155pfz.3 for ; Thu, 05 Jan 2017 22:52:46 -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=/tWFw493TGt6UcWg0GHVL+AqvTHUARLWLHS+URyieHw=; b=V4dNWsmlwKgR6WfH90CYYTafrGoFoHnzkptn4NhJYT8WWFn9BChkg3qDi3goThyLCe iLByxocU18qgTK6VE8MW1UEHxqov5Q/dHBnamQotH7n0OHqc9deIo39sdCTWY+f3HzeL DS6+ltT/xi0FGIvzvkD/VedPzsAOvhiIz6LVE= 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=/tWFw493TGt6UcWg0GHVL+AqvTHUARLWLHS+URyieHw=; b=qlRUpZESDUwdhgjUxB47UjV5lsKtywv0cdqkRMRFuwXojNCJsLrpfLLYT7I+0mg6J1 3vosl/1y1atK9hHTXZjg0d0GRflDIkhuuUeQuC4LqUpSkPZ6vYrHxi4BXABlHkBhbPa7 lqo+rQgH5M47PKniTyS/jw5yLdj8MMSpcTysVpKyxDQqU7GZQHdABjGzTjAhwrqBwear gxz0xqzwWVuVnM6LIv2NPRDQHo5WX6MAID4n5CSkgVAufSG0c7Mfmyf8hRHsK6jJ5CJv +/alc5+fOXHe35phGkwlnB+oObX7nbaXC0MDMii3cnKN2+PxZOheLxvrAI/+KYYwH5go yUeA== X-Gm-Message-State: AIkVDXKRRwBvDQpiWQebFIWNw/IuQCGzovleZoEGM7xWBnnI3I7LLIt0qiITbWP5X3E5kihw X-Received: by 10.84.139.67 with SMTP id 61mr161625503plq.65.1483685566615; Thu, 05 Jan 2017 22:52:46 -0800 (PST) Received: from localhost.localdomain ([45.56.159.83]) by smtp.gmail.com with ESMTPSA id p13sm159096976pgf.47.2017.01.05.22.52.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Jan 2017 22:52:46 -0800 (PST) From: Haojian Zhuang To: feng.tian@intel.com, leif.lindholm@linaro.org, ard.biesheuvel@linaro.org, edk2-devel@lists.01.org Date: Fri, 6 Jan 2017 14:52:16 +0800 Message-Id: <1483685538-11058-8-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: [edk2] [PATCH 7/9] Ufs: 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 --- 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 7c01d57..db70fb1 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));