mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Avri Altman <Avri.Altman@wdc.com>
To: Bean Huo <huobean@gmail.com>,
	"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Bart Van Assche <bvanassche@acm.org>,
	Bean Huo <beanhuo@micron.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2 4/4] scsi: ufs: Re-use compose_devman_upiu
Date: Thu, 7 Mar 2024 19:26:38 +0000	[thread overview]
Message-ID: <DM6PR04MB6575AC3761F84B308EB0633DFC202@DM6PR04MB6575.namprd04.prod.outlook.com> (raw)
In-Reply-To: <6826cdb060609f81c970fc21b2050535f7c5a810.camel@gmail.com>

> 
> 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;
> 


  reply	other threads:[~2024-03-07 19:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05 21:00 [PATCH v2 0/4] Re-use device management code fragments Avri Altman
2024-03-05 21:00 ` [PATCH v2 1/4] scsi: ufs: Re-use device management locking code Avri Altman
2024-03-06 21:21   ` Bean Huo
2024-03-05 21:00 ` [PATCH v2 2/4] scsi: ufs: Re-use exec_dev_cmd Avri Altman
2024-03-06 22:05   ` Bean Huo
2024-03-07 19:28     ` Avri Altman
2024-03-08 19:29       ` Bean Huo
2024-03-08 19:42         ` Avri Altman
2024-03-05 21:00 ` [PATCH v2 3/4] scsi: ufs: Re-use compose_dev_cmd Avri Altman
2024-03-07 12:50   ` Bean Huo
2024-03-07 18:12   ` Bart Van Assche
2024-03-05 21:00 ` [PATCH v2 4/4] scsi: ufs: Re-use compose_devman_upiu Avri Altman
2024-03-07 13:06   ` Bean Huo
2024-03-07 19:26     ` Avri Altman [this message]
2024-03-08 22:32       ` Bart Van Assche

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-all 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=DM6PR04MB6575AC3761F84B308EB0633DFC202@DM6PR04MB6575.namprd04.prod.outlook.com \
    --to=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=huobean@gmail.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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

all inboxes | Powered by JetHome®