From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: Haojian Zhuang 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: [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: , X-List-Received-Date: Mon, 16 Jan 2017 12:23:20 -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/UfsBlockIoPei/UfsHci.c | 2 ++ 1 file changed, 2 insertions(+) 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)); -- 2.7.4