From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (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 7252081D89 for ; Mon, 16 Jan 2017 08:03:01 -0800 (PST) Received: by mail-wm0-x22b.google.com with SMTP id c85so164223866wmi.1 for ; Mon, 16 Jan 2017 08:03:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=OuoclGFQHG3nR4ojWG6d9YlgOWZqUWWulSvVNnVyylo=; b=HljBSLaJ8KMMIgRyDBALGIy93ry4+1hG7+p2DmerTmNbox/WKp5W2e+H74HKvN96Vd ATtRl3+hknZBWnAyYMEqZRviVnFvjtltiwRerCsuRyNBZPeIcPAOUD+iLVlmGTyr9UoN UDxcxP+DBhaVSYqmMX3A3+5tZx9puH9bCevNo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=OuoclGFQHG3nR4ojWG6d9YlgOWZqUWWulSvVNnVyylo=; b=AFeGOCGDl/zwxn+uBLlrjXp/dypT4+IuCdaI0oceowT02Z796cX/Ex0Bq/l2mg81Q5 fo5nDDXLGW24Se5IoTRtDtlPzQWIwMQ7V/hvJ79Svieeve8yS61ddKvcEs5w1I6raHoe 08QvDxTYYQqDsHj68hItMdpzxpBZjX2CA5PptSKOOVVIDQ6xK13tl3zTMrxYDbWgiDbg GeW5XZca7ocy+tp7R9ALwYHzSs0YMSlOztzIuAX8crqX0bwmHjOEAvRhnbv/FAGgDBYy qQO1U0MD4gzLmUa4desoito56EZKMior4zanoYYN5C+TtUqrO5VXWTZ/rFMTCWTRRGiC bp5Q== X-Gm-Message-State: AIkVDXKVs8rtFXagzfaEOoCvJkfCqy/XnC38L062kEI+SP26/OAoEYbYnceIHSNG6Emlcn8N X-Received: by 10.223.128.77 with SMTP id 71mr24122911wrk.48.1484582580025; Mon, 16 Jan 2017 08:03:00 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id y145sm29696547wmc.17.2017.01.16.08.02.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Jan 2017 08:02:59 -0800 (PST) Date: Mon, 16 Jan 2017 16:02:56 +0000 From: Leif Lindholm To: Haojian Zhuang Cc: feng.tian@intel.com, ard.biesheuvel@linaro.org, edk2-devel@lists.01.org Message-ID: <20170116160256.GK25883@bivouac.eciton.net> References: <1484569378-16126-1-git-send-email-haojian.zhuang@linaro.org> <1484569378-16126-6-git-send-email-haojian.zhuang@linaro.org> MIME-Version: 1.0 In-Reply-To: <1484569378-16126-6-git-send-email-haojian.zhuang@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [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 16:03:01 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jan 16, 2017 at 08:22:58PM +0800, Haojian Zhuang wrote: > 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; Could these be given some #define in UfsHci.h rather than inline magic numbers? Regards, Leif > 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 >