linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daejun Park <daejun7.park@samsung.com>
To: Avri Altman <Avri.Altman@wdc.com>,
	Daejun Park <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: RE: [PATCH v21 2/4] scsi: ufs: L2P map management for HPB read
Date: Mon, 22 Feb 2021 17:16:58 +0900	[thread overview]
Message-ID: <20210222081658epcms2p4dcc6bfa0da7b6222cc4262a36374d3ad@epcms2p4> (raw)
In-Reply-To: <DM6PR04MB6575F5244F17B022E6E78DC7FC829@DM6PR04MB6575.namprd04.prod.outlook.com>

> +static bool ufshpb_is_hpb_rsp_valid(struct ufs_hba *hba,
> > +                                        struct ufshcd_lrb *lrbp,
> > +                                        struct utp_hpb_rsp *rsp_field)
> > +{
> > +       if (be16_to_cpu(rsp_field->sense_data_len) != DEV_SENSE_SEG_LEN ||
> > +           rsp_field->desc_type != DEV_DES_TYPE ||
> > +           rsp_field->additional_len != DEV_ADDITIONAL_LEN ||
> > +           rsp_field->active_rgn_cnt > MAX_ACTIVE_NUM ||
> > +           rsp_field->inactive_rgn_cnt > MAX_INACTIVE_NUM ||
> > +           (rsp_field->hpb_op == HPB_RSP_REQ_REGION_UPDATE &&
> > +            !rsp_field->active_rgn_cnt && !rsp_field->inactive_rgn_cnt))
> > +               return false;
> > +
> > +       /* we cannot access HPB from other LU */
> > +       if (lrbp->lun != rsp_field->lun)
> > +               return false;
> Why not?
> Clearly this against the spec which allows to attach hpb sense crossed luns
>  
> > +
> > +       if (!ufshpb_is_general_lun(lrbp->lun)) {
> > +               dev_warn(hba->dev, "ufshpb: lun(%d) not supported\n",
> > +                        lrbp->lun);
> > +               return false;
> > +       }
> > +
> > +       return true;
> > +}
>  
>  
>  
>  
> > +void ufshpb_rsp_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
> > +{
> > +       struct ufshpb_lu *hpb = ufshpb_get_hpb_data(lrbp->cmd->device);
> > +       struct utp_hpb_rsp *rsp_field;
> > +       int data_seg_len;
> > +
> > +       if (!hpb)
> > +               return;
> Ditto

I fixed the code to support the crossed-hint.

Thanks,
Daejun

  parent reply	other threads:[~2021-02-22  8:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210218090627epcms2p639c216ccebed773120121b1d53641d94@epcms2p6>
2021-02-18  9:06 ` [PATCH v21 0/4] scsi: ufs: Add Host Performance Booster Support Daejun Park
     [not found]   ` <CGME20210218090627epcms2p639c216ccebed773120121b1d53641d94@epcms2p8>
2021-02-18  9:07     ` [PATCH v21 1/4] scsi: ufs: Introduce HPB feature Daejun Park
2021-02-18  9:07     ` [PATCH v21 2/4] scsi: ufs: L2P map management for HPB read Daejun Park
2021-02-21 11:54       ` Avri Altman
2021-02-21 12:06       ` Avri Altman
     [not found]       ` <CGME20210218090627epcms2p639c216ccebed773120121b1d53641d94@epcms2p4>
2021-02-22  8:15         ` Daejun Park
2021-02-22  8:16         ` Daejun Park [this message]
2021-02-22  8:21         ` RE: [PATCH v21 4/4] scsi: ufs: Add HPB 2.0 support Daejun Park
2021-02-18  9:08     ` Daejun Park
2021-02-20 14:33       ` Avri Altman
     [not found]   ` <CGME20210218090627epcms2p639c216ccebed773120121b1d53641d94@epcms2p2>
2021-02-18  9:08     ` [PATCH v21 3/4] scsi: ufs: Prepare HPB read for cached sub-region Daejun Park
2021-02-21  7:24       ` Avri Altman
     [not found]       ` <CGME20210218090627epcms2p639c216ccebed773120121b1d53641d94@epcms2p7>
2021-02-22  8:20         ` 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=20210222081658epcms2p4dcc6bfa0da7b6222cc4262a36374d3ad@epcms2p4 \
    --to=daejun7.park@samsung.com \
    --cc=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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).