Re: [RFC PATCH v3 1/4] ufs: core: prepare ufs for multi circular queue support

From: Bean Huo
Date: Thu Sep 08 2022 - 04:23:40 EST


On Wed, 2022-09-07 at 20:00 -0700, Asutosh Das (asd) wrote:
> > > ufshcd_lrb *lrbp, u8 upiu_flags)
> > >           /* command descriptor fields */
> > >           ucd_req_ptr->header.dword_0 = UPIU_HEADER_DWORD(
> > >                                   UPIU_TRANSACTION_COMMAND,
> > > upiu_flags,
> > > -                               lrbp->lun, lrbp->task_tag);
> > > +                               lrbp->lun, lrbp->task_tag &
> > > 0xff);
> > >           ucd_req_ptr->header.dword_1 = UPIU_HEADER_DWORD(
> > > -                               UPIU_COMMAND_SET_TYPE_SCSI, 0, 0,
> > > 0);
> > > +                               UPIU_COMMAND_SET_TYPE_SCSI, 0, 0,
> > > +                               (lrbp->task_tag & 0xf00) << 4);
> > >   
> >
> > Are you sure here "(lrbp->task_tag & 0xf00) << 4" is correct?
> >
> EXT_IID is the higher nibble in DWORD1. So this looks correct to me.
>
> COMMAND UPIU
> 0           1     2     3
> xx000001b Flags LUN Task Tag
> 4                       5       6       7
> IID Command Set Type Reserved Reserved EXT_IID | Reserved

Hi Asutosh,

yes, [7:4] of byte 7 in UPIU header for host to device UPIUs EXT_IID,
this is correct.

but I think byte7 should be (lrbp->task_tag & 0xf00) >> 4); rather
than "<< 4"

or what I missundersood.


Kind regards,
Bean