All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avri Altman <Avri.Altman@wdc.com>
To: Avri Altman <Avri.Altman@wdc.com>,
	"daejun7.park@samsung.com" <daejun7.park@samsung.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"asutoshd@codeaurora.org" <asutoshd@codeaurora.org>,
	"stanley.chu@mediatek.com" <stanley.chu@mediatek.com>,
	"cang@codeaurora.org" <cang@codeaurora.org>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"huobean@gmail.com" <huobean@gmail.com>,
	ALIM AKHTAR <alim.akhtar@samsung.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	JinHwan Park <jh.i.park@samsung.com>,
	Javier Gonzalez <javier.gonz@samsung.com>,
	SEUNGUK SHIN <seunguk.shin@samsung.com>,
	Sung-Jun Park <sungjun07.park@samsung.com>,
	yongmyung lee <ymhungry.lee@samsung.com>,
	Jinyoung CHOI <j-young.choi@samsung.com>,
	BoRam Shin <boram.shin@samsung.com>
Subject: RE: [PATCH v24 4/4] scsi: ufs: Add HPB 2.0 support
Date: Wed, 24 Feb 2021 11:52:52 +0000	[thread overview]
Message-ID: <DM6PR04MB6575ECC05596740425EC948EFC9F9@DM6PR04MB6575.namprd04.prod.outlook.com> (raw)
In-Reply-To: <DM6PR04MB65759C2968CDEFF32A0A95FDFC9F9@DM6PR04MB6575.namprd04.prod.outlook.com>

> 
> 
> > +static int ufshpb_issue_umap_all_req(struct ufshpb_lu *hpb)
> Maybe ufshpb_issue_umap_all_req is just a wrapper for
> ufshpb_issue_umap_req?
> e.g it calls ufshpb_issue_umap_req(hpb, int read_buferr_id = 0x3) ?
> Then on host mode inactivation:
> static int ufshpb_issue_umap_single_req(struct ufshpb_lu *hpb)
> {
>         return ufshpb_issue_umap_req(hpb, 0x1);
> }
Better yet, ufshpb_execute_umap_req can get *rgn as an extra argument.
ufshpb_issue_umap_all_req will call it with NULL, while
ufshpb_issue_umap_single_req will call it with the rgn to inactivate.

Then,  ufshpb_set_unmap_cmd takes the form:
static void ufshpb_set_unmap_cmd(unsigned char *cdb, struct ufshpb_region *rgn)
{
        cdb[0] = UFSHPB_WRITE_BUFFER;

        if (rgn) {
                cdb[1] = UFSHPB_WRITE_BUFFER_INACT_SINGLE_ID;
                put_unaligned_be16(rgn->rgn_idx, &cdb[2]);
        } else {
                cdb[1] = UFSHPB_WRITE_BUFFER_INACT_ALL_ID;
        }

        cdb[9] = 0x00;
}

Does it make sense?
Thanks,
Avri

  reply	other threads:[~2021-02-24 11:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210224045323epcms2p66cc6a4b73086621e050da37f12f432f0@epcms2p6>
2021-02-24  4:53 ` [PATCH v24 0/4] scsi: ufs: Add Host Performance Booster Support Daejun Park
     [not found]   ` <CGME20210224045323epcms2p66cc6a4b73086621e050da37f12f432f0@epcms2p7>
2021-02-24  4:54     ` [PATCH v24 2/4] scsi: ufs: L2P map management for HPB read Daejun Park
2021-02-25 14:59       ` Bean Huo
     [not found]       ` <CGME20210224045323epcms2p66cc6a4b73086621e050da37f12f432f0@epcms2p4>
2021-02-26  4:53         ` Daejun Park
2021-02-24  4:55     ` [PATCH v24 3/4] scsi: ufs: Prepare HPB read for cached sub-region Daejun Park
     [not found]   ` <CGME20210224045323epcms2p66cc6a4b73086621e050da37f12f432f0@epcms2p2>
2021-02-24  4:54     ` [PATCH v24 1/4] scsi: ufs: Introduce HPB feature Daejun Park
2021-02-25 14:38       ` Bean Huo
     [not found]       ` <CGME20210224045323epcms2p66cc6a4b73086621e050da37f12f432f0@epcms2p1>
2021-02-26  4:49         ` Daejun Park
2021-02-24  4:55     ` [PATCH v24 4/4] scsi: ufs: Add HPB 2.0 support Daejun Park
2021-02-24  9:52       ` Avri Altman
2021-02-24 10:24       ` Avri Altman
2021-02-24 11:52         ` Avri Altman [this message]
     [not found]         ` <CGME20210224045323epcms2p66cc6a4b73086621e050da37f12f432f0@epcms2p5>
2021-02-25  3:25           ` Daejun Park
2021-02-25  3:26 ` Daejun Park

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=DM6PR04MB6575ECC05596740425EC948EFC9F9@DM6PR04MB6575.namprd04.prod.outlook.com \
    --to=avri.altman@wdc.com \
    --cc=alim.akhtar@samsung.com \
    --cc=asutoshd@codeaurora.org \
    --cc=boram.shin@samsung.com \
    --cc=bvanassche@acm.org \
    --cc=cang@codeaurora.org \
    --cc=daejun7.park@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=huobean@gmail.com \
    --cc=j-young.choi@samsung.com \
    --cc=javier.gonz@samsung.com \
    --cc=jejb@linux.ibm.com \
    --cc=jh.i.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=seunguk.shin@samsung.com \
    --cc=stanley.chu@mediatek.com \
    --cc=sungjun07.park@samsung.com \
    --cc=ymhungry.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.