public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Leif Lindholm <leif.lindholm@linaro.org>
To: "Tian, Feng" <feng.tian@intel.com>
Cc: Haojian Zhuang <haojian.zhuang@linaro.org>,
	"ard.biesheuvel@linaro.org" <ard.biesheuvel@linaro.org>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH v2 5/5] MdeModulePkg/UfsBlockIoPei: fix initialize OCS value to 0x0F
Date: Tue, 17 Jan 2017 10:56:05 +0000	[thread overview]
Message-ID: <20170117105605.GP25883@bivouac.eciton.net> (raw)
In-Reply-To: <7F1BAD85ADEA444D97065A60D2E97EE5699A9E4B@SHSMSX101.ccr.corp.intel.com>

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 <feng.tian@intel.com>
> 
> Thanks
> Feng
> 
> -----Original Message-----
> From: Leif Lindholm [mailto:leif.lindholm@linaro.org] 
> Sent: Tuesday, January 17, 2017 12:03 AM
> To: Haojian Zhuang <haojian.zhuang@linaro.org>
> Cc: Tian, Feng <feng.tian@intel.com>; 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 <haojian.zhuang@linaro.org>
> > ---
> >  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
> > 


      reply	other threads:[~2017-01-17 10:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16 12:22 [PATCH v2 0/5] fix UFS driver Haojian Zhuang
2017-01-16 12:22 ` [PATCH v2 1/5] MdeModuelPkg/UfsPassThruDxe: fix to identify 32 bits address mode Haojian Zhuang
2017-01-16 12:22 ` [PATCH v2 2/5] MdeModulePkg/UfsPassThruDxe: fix the bit in UFS_HC_UTRLDBR_OFFSET reg Haojian Zhuang
2017-01-16 12:22 ` [PATCH v2 3/5] MdeModulePkg/UfsBlockIoPei: " Haojian Zhuang
2017-01-16 12:22 ` [PATCH v2 4/5] MdeModulePkg/UfsPassThruDxe: fix initialize OCS value to 0x0F Haojian Zhuang
2017-01-16 12:22 ` [PATCH v2 5/5] MdeModulePkg/UfsBlockIoPei: " Haojian Zhuang
2017-01-16 16:02   ` Leif Lindholm
2017-01-17  2:06     ` Tian, Feng
2017-01-17 10:56       ` Leif Lindholm [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170117105605.GP25883@bivouac.eciton.net \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox