From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BDDE281DEA for ; Mon, 16 Jan 2017 18:06:54 -0800 (PST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP; 16 Jan 2017 18:06:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,242,1477983600"; d="scan'208";a="49501191" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga004.jf.intel.com with ESMTP; 16 Jan 2017 18:06:54 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 16 Jan 2017 18:06:54 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 16 Jan 2017 18:06:54 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.177]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Tue, 17 Jan 2017 10:06:52 +0800 From: "Tian, Feng" To: Leif Lindholm , Haojian Zhuang CC: "ard.biesheuvel@linaro.org" , "edk2-devel@lists.01.org" , "Tian, Feng" Thread-Topic: [PATCH v2 5/5] MdeModulePkg/UfsBlockIoPei: fix initialize OCS value to 0x0F Thread-Index: AQHScBIINeV7pwG1cU+xcKjUjJigFqE76/5w Date: Tue, 17 Jan 2017 02:06:51 +0000 Message-ID: <7F1BAD85ADEA444D97065A60D2E97EE5699A9E4B@SHSMSX101.ccr.corp.intel.com> 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> In-Reply-To: <20170116160256.GK25883@bivouac.eciton.net> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 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 02:06:54 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 patch= es into EDKII trunk. Series reviewed-by: Feng Tian Thanks Feng -----Original Message----- From: Leif Lindholm [mailto:leif.lindholm@linaro.org]=20 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. >=20 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Haojian Zhuang > --- > MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c=20 > 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 =3D UFS_INTERRUPT_COMMAND; > Trd->Dd =3D DataDirection; > Trd->Ct =3D UFS_STORAGE_COMMAND_TYPE; > + Trd->Ocs =3D 0x0F; Could these be given some #define in UfsHci.h rather than inline magic numb= ers? Regards, Leif > Trd->UcdBa =3D (UINT32)RShiftU64 ((UINT64)(UINTN)CommandUpiu, 7); > Trd->UcdBaU =3D (UINT32)RShiftU64 ((UINT64)(UINTN)CommandUpiu, 32); > Trd->RuL =3D (UINT16)DivU64x32 ((UINT64)ROUNDUP8 (sizeof (UTP_RESPO= NSE_UPIU)), sizeof (UINT32)); > @@ -637,6 +638,7 @@ UfsCreateNopCommandDesc ( > Trd->Int =3D UFS_INTERRUPT_COMMAND; > Trd->Dd =3D 0x00; > Trd->Ct =3D UFS_STORAGE_COMMAND_TYPE; > + Trd->Ocs =3D 0x0F; > Trd->UcdBa =3D (UINT32)RShiftU64 ((UINT64)(UINTN)NopOutUpiu, 7); > Trd->UcdBaU =3D (UINT32)RShiftU64 ((UINT64)(UINTN)NopOutUpiu, 32); > Trd->RuL =3D (UINT16)DivU64x32 ((UINT64)ROUNDUP8 (sizeof (UTP_NOP_I= N_UPIU)), sizeof (UINT32)); > -- > 2.7.4 >=20