From: "Kiwoong Kim" <kwmad.kim@samsung.com>
To: "'Avri Altman'" <Avri.Altman@wdc.com>,
<linux-scsi@vger.kernel.org>, <alim.akhtar@samsung.com>,
<jejb@linux.ibm.com>, <martin.petersen@oracle.com>,
<beanhuo@micron.com>, <asutoshd@codeaurora.org>,
<cang@codeaurora.org>, <bvanassche@acm.org>,
<grant.jung@samsung.com>, <sc.suh@samsung.com>,
<hy50.seo@samsung.com>, <sh425.lee@samsung.com>
Subject: RE: [RFC PATCH v3 1/2] ufs: introduce a callback to get info of command completion
Date: Mon, 6 Jul 2020 15:41:14 +0900 [thread overview]
Message-ID: <000501d65360$72259600$5670c200$@samsung.com> (raw)
In-Reply-To: <SN6PR04MB464035D0414922EEE0545CA6FC680@SN6PR04MB4640.namprd04.prod.outlook.com>
> > Some SoC specific might need command history for various reasons, such
> > as stacking command contexts in system memory to check for debugging
> > in the future or scaling some DVFS knobs to boost IO throughput.
> >
> > What you would do with the information could be variant per SoC
> > vendor.
> >
> > Signed-off-by: Kiwoong Kim <kwmad.kim@samsung.com>
> > ---
> > drivers/scsi/ufs/ufshcd.c | 2 ++
> > drivers/scsi/ufs/ufshcd.h | 8 ++++++++
> > 2 files changed, 10 insertions(+)
> >
> > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> > index 52abe82..3326236 100644
> > --- a/drivers/scsi/ufs/ufshcd.c
> > +++ b/drivers/scsi/ufs/ufshcd.c
> > @@ -4882,6 +4882,7 @@ static void __ufshcd_transfer_req_compl(struct
> > ufs_hba *hba,
> > for_each_set_bit(index, &completed_reqs, hba->nutrs) {
> > lrbp = &hba->lrb[index];
> > cmd = lrbp->cmd;
> > + ufshcd_vops_compl_xfer_req(hba, index, (cmd) ? true :
> > + false);
> > if (cmd) {
> > ufshcd_add_command_trace(hba, index, "complete");
> > result = ufshcd_transfer_rsp_status(hba,
> > lrbp); @@ -4890,6 +4891,7 @@ static void
> > __ufshcd_transfer_req_compl(struct
> > ufs_hba *hba,
> > /* Mark completed command as NULL in LRB */
> > lrbp->cmd = NULL;
> > lrbp->compl_time_stamp = ktime_get();
> > +
> > /* Do not touch lrbp after scsi done */
> > cmd->scsi_done(cmd);
> > __ufshcd_release(hba); diff --git
> > a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index
> > c774012..5cf9f99 100644
> > --- a/drivers/scsi/ufs/ufshcd.h
> > +++ b/drivers/scsi/ufs/ufshcd.h
> > @@ -307,6 +307,7 @@ struct ufs_hba_variant_ops {
> > void (*config_scaling_param)(struct ufs_hba *hba,
> > struct devfreq_dev_profile *profile,
> > void *data);
> > + void (*compl_xfer_req)(struct ufs_hba *hba, int tag, bool
> is_scsi);
> Maybe add it right after setup_xfer_req?
> Makes more sense as it is its counterpart.
>
> Thanks,
> Avri
>
> > };
Got it
Thanks.
Kiwoong Kim
next prev parent reply other threads:[~2020-07-06 6:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200703053852epcas2p47779aeac8c01a2b94596fdd9e660fe69@epcas2p4.samsung.com>
2020-07-03 5:31 ` [RFC PATCH v3 0/2] ufs: introduce callbacks to get command information Kiwoong Kim
2020-07-03 5:31 ` [RFC PATCH v3 1/2] ufs: introduce a callback to get info of command completion Kiwoong Kim
2020-07-03 5:59 ` Stanley Chu
2020-07-03 7:08 ` Kiwoong Kim
2020-07-05 11:37 ` Avri Altman
2020-07-06 6:41 ` Kiwoong Kim [this message]
2020-07-03 5:31 ` [RFC PATCH v3 2/2] exynos-ufs: implement dbg_register_dump and compl_xfer_req Kiwoong Kim
2020-07-05 11:38 ` Avri Altman
2020-07-06 6:41 ` Kiwoong Kim
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='000501d65360$72259600$5670c200$@samsung.com' \
--to=kwmad.kim@samsung.com \
--cc=Avri.Altman@wdc.com \
--cc=alim.akhtar@samsung.com \
--cc=asutoshd@codeaurora.org \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=cang@codeaurora.org \
--cc=grant.jung@samsung.com \
--cc=hy50.seo@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sc.suh@samsung.com \
--cc=sh425.lee@samsung.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