From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::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 F40E181C15 for ; Tue, 17 Jan 2017 02:56:09 -0800 (PST) Received: by mail-wm0-x22a.google.com with SMTP id c206so216835904wme.0 for ; Tue, 17 Jan 2017 02:56:10 -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=wWunJlyrFeFPglatmNnJ95ZRowaSVMHjd7+FM2VZhmc=; b=YRXgI6RWpVugys4gRwCVH2+dejoziEg947J5FLoKYIEa/7IiQMdNt5jlYwK5HIHMgX IqbuFajbY2K57puPEPSsrsK/ICQ469hMHl7WX/aTGdyyXtjXjhXcMqSNzkMU73MRCeaO xTjnUx3M1JhFGDJsJFBZDPoR4FzXCyqU0tacM= 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=wWunJlyrFeFPglatmNnJ95ZRowaSVMHjd7+FM2VZhmc=; b=UCS2uXNZmnUD4aGTyUVPCaJfPZ3WAveArC8U7UoIx0uYR5NZfcNuSM29U59UkgY+is 3xUe4qWA6x4O6wXo38nUvddd/SdsHN52u3PSiKewm89zCrKKyMmM1GpFkriA2gwCUyI8 5wIJB3Etoa2Ba56IOmId/S2woWgVIMijiDkCeRhF7hpirgLCuYPQX9RsK3YwVsAGTa0v 0+E6EF4lBj7WgYr53yCm9V4Px1G545okkP27f9jxozoWt557d5oj44mHp6uecfjSBoBq ZJA4Pv+hfN5+EhzrWOnlA1wwSyknn/8VCJumgoQRmsujFZBOrjdRImRu8DL7GBiFMf+u Ritw== X-Gm-Message-State: AIkVDXKvrmLcFAckR+d0nuqn41+8YRETIkt87nbfnQ8iZycALpOF7OFF6BPjHI09WwPB9L91 X-Received: by 10.223.178.243 with SMTP id g106mr13036981wrd.32.1484650569108; Tue, 17 Jan 2017 02:56:09 -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 a13sm36164611wma.0.2017.01.17.02.56.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jan 2017 02:56:08 -0800 (PST) Date: Tue, 17 Jan 2017 10:56:05 +0000 From: Leif Lindholm To: "Tian, Feng" Cc: Haojian Zhuang , "ard.biesheuvel@linaro.org" , "edk2-devel@lists.01.org" Message-ID: <20170117105605.GP25883@bivouac.eciton.net> References: <1484569378-16126-1-git-send-email-haojian.zhuang@linaro.org> <1484569378-16126-6-git-send-email-haojian.zhuang@linaro.org> <20170116160256.GK25883@bivouac.eciton.net> <7F1BAD85ADEA444D97065A60D2E97EE5699A9E4B@SHSMSX101.ccr.corp.intel.com> MIME-Version: 1.0 In-Reply-To: <7F1BAD85ADEA444D97065A60D2E97EE5699A9E4B@SHSMSX101.ccr.corp.intel.com> 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: Tue, 17 Jan 2017 10:56:10 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jan 17, 2017 at 02:06:51AM +0000, Tian, Feng wrote: > Agree. > > How about naming it as UFS_TRD_OCS_INIT_VALUE? > > If there is no objection, I will help make this change and push > these patches into EDKII trunk. That sounds excellent to me, thanks! / Leif > Series reviewed-by: Feng Tian > > Thanks > Feng > > -----Original Message----- > From: Leif Lindholm [mailto:leif.lindholm@linaro.org] > Sent: Tuesday, January 17, 2017 12:03 AM > To: Haojian Zhuang > Cc: Tian, Feng ; ard.biesheuvel@linaro.org; edk2-devel@lists.01.org > Subject: Re: [PATCH v2 5/5] MdeModulePkg/UfsBlockIoPei: fix initialize OCS value to 0x0F > > 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 > >