From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: Haojian Zhuang 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: [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: , X-List-Received-Date: Fri, 06 Jan 2017 06:52:47 -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 --- 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 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)); -- 2.7.4