From patchwork Mon Jan 16 12:22:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 91568 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1395456qgi; Mon, 16 Jan 2017 04:23:22 -0800 (PST) X-Received: by 10.99.5.15 with SMTP id 15mr11406806pgf.109.1484569402454; Mon, 16 Jan 2017 04:23:22 -0800 (PST) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id p83si20832485pfi.65.2017.01.16.04.23.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Jan 2017 04:23:22 -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 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 9541581DA9; Mon, 16 Jan 2017 04:23:21 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-pg0-x22a.google.com (mail-pg0-x22a.google.com [IPv6:2607:f8b0:400e:c05::22a]) (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 6448581CCC for ; Mon, 16 Jan 2017 04:23:20 -0800 (PST) Received: by mail-pg0-x22a.google.com with SMTP id 14so15479899pgg.1 for ; Mon, 16 Jan 2017 04:23:20 -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=Pee7GlCqazNZnyfUBQSi42h+V80jWjwu+ShlRva+PHQ=; b=Cu6nQnArkFpLW1Vww3eVheEBQz8/M3ZZCBt6RCiGCh6NcHdXZxSCYgH2ZlU5jCU3xW ozWcdLt0HEWXJfc0p9B/Nh/cfKA3sZg8CSKZcvYkXeCzF+AUDcpxjlhVsVl6VYdMWKjN cuGKMafOIGVYGONvFCreWyRd18UDucgXqDLVk= 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=Pee7GlCqazNZnyfUBQSi42h+V80jWjwu+ShlRva+PHQ=; b=pYNMgc1Y5ibf5GZTQyaDtRFhjGhATPhD0oqT9EBvvJ/uhkczcd3hyZCngMAXNk5TBQ wSM2TpeXiTz3xen66tybaK5f6H6JAxulpdtvczN7pJtFehdBJr5L1rHFPcbr7JJxIg8c 2JTM4KlsNThgaQmpPZGHGlfjYFN4OuP/PmIR80h+6TtgtK+DUiFNrLw03XnnHQ6HtW9s HjzdLi16Rq9kd2H2RgF5IwiFqGiCi/pt/tmLl9yeIhx7gsxAyLFsbJf6XG7gmW9dO4oR jEMVymtIpiHsDbRkr0uDIbHSx/soC1cBHv1TuMvnhtB6aYx+sTqsjmuYagVCPKvTnpv6 wv/w== X-Gm-Message-State: AIkVDXJviCY66lHzg0yLmFZnDAe6pVNFxGPQp5/71gCWn3ut4zZKzU51aH4lJ4iNpU/bxbEx X-Received: by 10.84.217.68 with SMTP id e4mr16164041plj.99.1484569400637; Mon, 16 Jan 2017 04:23:20 -0800 (PST) Received: from localhost.localdomain ([45.56.159.104]) by smtp.gmail.com with ESMTPSA id v186sm10361286pgv.44.2017.01.16.04.23.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Jan 2017 04:23:20 -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:58 +0800 Message-Id: <1484569378-16126-6-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 5/5] MdeModulePkg/UfsBlockIoPei: 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/UfsBlockIoPei/UfsHci.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/UfsBlockIoPei/UfsHci.c b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c index cccacce..67042b7 100644 --- a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c +++ b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c @@ -480,6 +480,7 @@ UfsCreateScsiCommandDesc ( Trd->Int = UFS_INTERRUPT_COMMAND; Trd->Dd = DataDirection; Trd->Ct = UFS_STORAGE_COMMAND_TYPE; + Trd->Ocs = 0x0F; Trd->UcdBa = (UINT32)RShiftU64 ((UINT64)(UINTN)CommandUpiu, 7); Trd->UcdBaU = (UINT32)RShiftU64 ((UINT64)(UINTN)CommandUpiu, 32); Trd->RuL = (UINT16)DivU64x32 ((UINT64)ROUNDUP8 (sizeof (UTP_RESPONSE_UPIU)), sizeof (UINT32)); @@ -637,6 +638,7 @@ UfsCreateNopCommandDesc ( Trd->Int = UFS_INTERRUPT_COMMAND; Trd->Dd = 0x00; Trd->Ct = UFS_STORAGE_COMMAND_TYPE; + Trd->Ocs = 0x0F; Trd->UcdBa = (UINT32)RShiftU64 ((UINT64)(UINTN)NopOutUpiu, 7); Trd->UcdBaU = (UINT32)RShiftU64 ((UINT64)(UINTN)NopOutUpiu, 32); Trd->RuL = (UINT16)DivU64x32 ((UINT64)ROUNDUP8 (sizeof (UTP_NOP_IN_UPIU)), sizeof (UINT32));