mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Avri Altman <Avri.Altman@wdc.com>
To: Bart Van Assche <bvanassche@acm.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2] scsi: ufs: Zero utp_upiu_req at the beginning of each command
Date: Thu, 19 Sep 2024 06:59:35 +0000	[thread overview]
Message-ID: <DM6PR04MB6575FD6BCCDC3327885E6DF6FC632@DM6PR04MB6575.namprd04.prod.outlook.com> (raw)
In-Reply-To: <6bb14e23-7711-4d27-8efa-4e60cd737fa5@acm.org>

> On 9/17/24 11:03 PM, Avri Altman wrote:
> > My proposal is making 4 changes, attending the 5 upiu types:
> >   1) Zero query upiu and nop upiu in ufshcd_compose_devman_upiu
> >   2) zero command upiu in ufshcd_comp_scsi_upiu
> >   3) zero raw query upiu in ufshcd_issue_devman_upiu_cmd, and
> >   4) zero rpmb extended header (raw command upiu) in
> > ufshcd_advanced_rpmb_req_handler
> >
> > Your proposal is making 3 changes:
> >   - zero query upiu in ufshcd_prepare_utp_query_req_upiu
> >   - zero nop upiu in ufshcd_prepare_utp_nop_upiu
> >   - zero command upiu in ufshcd_prepare_utp_scsi_cmd_upiu And you
> > haven't zero the raw query upiu nor the rpmb extended header .
>   Hi Avri,
> 
> Would it be possible to combine our patches in such a way that all UPIU types are
> covered and such that the memset() calls for query, nop and command UPIUs
> occur in the functions that initialize *ucd_req_ptr->header?
I guess so.
One approach is to use the fact that all prep instances calls ufshcd_prepare_req_desc_hdr  which instantiate the UTRD header.
Although it reduces the memset() calls to a single call,
this option is less good IMO because the UTRD header shouldn't have anything to do with the upiu itself.

Alternatively, we can move it to ufshcd_setup_dev_cmd in which we'll end up with 2 calls:
One for command upiu in ufshcd_comp_scsi_upiu and one for all others in ufshcd_setup_dev_cmd,
Which makes more sense to me.

Thanks,
Avri
> 
> Thanks,
> 
> Bart.

      reply	other threads:[~2024-09-19  6:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-15  7:48 Avri Altman
2024-09-16 22:20 ` Bart Van Assche
2024-09-17  6:52   ` Avri Altman
2024-09-17 14:30     ` Bart Van Assche
2024-09-18  6:03       ` Avri Altman
2024-09-18 17:51         ` Bart Van Assche
2024-09-19  6:59           ` Avri Altman [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-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=DM6PR04MB6575FD6BCCDC3327885E6DF6FC632@DM6PR04MB6575.namprd04.prod.outlook.com \
    --to=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --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®