RE: [PATCH v2 4/4] scsi: ufs: Re-use compose_devman_upiu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> On Tue, 2024-03-05 at 23:00 +0200, Avri Altman wrote:
> > diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> > index c9c2b7f99758..a39a2b34ee2b 100644
> > --- a/drivers/ufs/core/ufshcd.c
> > +++ b/drivers/ufs/core/ufshcd.c
> > @@ -2710,18 +2710,27 @@ static void ufshcd_disable_intr(struct ufs_hba
> > *hba, u32 intrs)
> >  /**
> >   * ufshcd_prepare_req_desc_hdr - Fill UTP Transfer request descriptor
> > header according to request
> >   * descriptor according to request
> > + * @hba: per adapter instance
> >   * @lrbp: pointer to local reference block
> >   * @upiu_flags: flags required in the header
> >   * @cmd_dir: requests data direction
> >   * @ehs_length: Total EHS Length (in 32‐bytes units of all Extra
> > Header Segments)
> > + * @scsi: scsi or device management`
>                                       ^  '`'
> 
> >   */
> > -static void ufshcd_prepare_req_desc_hdr(struct ufshcd_lrb *lrbp, u8
> > *upiu_flags,
> > -                                       enum dma_data_direction
> > cmd_dir, int ehs_length)
> > +static void
> > +ufshcd_prepare_req_desc_hdr(struct ufs_hba *hba, struct ufshcd_lrb
> > *lrbp,
> > +                           u8 *upiu_flags, enum dma_data_direction
> > cmd_dir,
> > +                           int ehs_length, bool scsi)
> 
> Why not directly pass UTP_CMD_TYPE_SCSI or UTP_CMD_TYPE_DEV_MANAGE
> instead of using below ?: logic?
Thanks.  Will do that.

Thanks,
Avri

> 
> 
> >  {
> >         struct utp_transfer_req_desc *req_desc = lrbp-
> > >utr_descriptor_ptr;
> >         struct request_desc_header *h = &req_desc->header;
> >         enum utp_data_direction data_direction;
> >
> > +       if (hba->ufs_version <= ufshci_version(1, 1))
> > +               lrbp->command_type = scsi ? UTP_CMD_TYPE_SCSI :
> > UTP_CMD_TYPE_DEV_MANAGE;
> 





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux