linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daejun Park <daejun7.park@samsung.com>
To: Bart Van Assche <bvanassche@acm.org>,
	Daejun Park <daejun7.park@samsung.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	"avri.altman@wdc.com" <avri.altman@wdc.com>,
	"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>,
	"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>,
	Sung-Jun Park <sungjun07.park@samsung.com>,
	Jinyoung CHOI <j-young.choi@samsung.com>,
	Dukhyun Kwon <d_hyun.kwon@samsung.com>,
	Keoseong Park <keosung.park@samsung.com>,
	Jaemyung Lee <jaemyung.lee@samsung.com>,
	Jieon Seol <jieon.seol@samsung.com>
Subject: RE: Re: [PATCH v35 3/4] scsi: ufs: Prepare HPB read for cached sub-region
Date: Fri, 04 Jun 2021 13:06:36 +0900	[thread overview]
Message-ID: <20210604040636epcms2p7bcf940a2cd060336f79250de0060e08c@epcms2p7> (raw)
In-Reply-To: <4bf317c8-4c74-2207-95e2-34c59b14c454@acm.org>

>>> +/*
>>>> + * This function will set up HPB read command using host-side L2P map data.
>>>> + * In HPB v1.0, maximum size of HPB read command is 4KB.
>>>> + */
>>>> +void ufshpb_prep(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
>>>> +{
>>> [ ... ]
>>>> +
>>>> +        ufshpb_set_hpb_read_to_upiu(hpb, lrbp, lpn, ppn, transfer_len);
>>>
>>> 'transfer_len' has type int and is truncated to type 'u8' when passed as
>>> an argument to ufshpb_set_hpb_read_to_upiu(). Please handle transfer_len
>>> values >= 256 properly.
>> 
>> Before entering the function, ufshpb_is_supported_chunk() checks whether
>> transfer_len <= hpb->pre_req_max_tr_len which is set to
>> HPB_MULTI_CHUNK_HIGH (128) on initalization.
> 
>How about adding a WARN_ON_ONCE() in ufshpb_prep() that verifies that
>transfer_len is <= HPB_MULTI_CHUNK_HIGH?

Sure, I will add WARN_ON_ONCE() just after calling ufshpb_is_supported_chunk().

Thanks

> 
>Thanks,
> 
>Bart.
> 
> 
>  

  parent reply	other threads:[~2021-06-04  4:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210524084345epcms2p63dde85f3fdc127c29d25ada7d7f539cb@epcms2p6>
2021-05-24  8:43 ` [PATCH v35 0/4] scsi: ufs: Add Host Performance Booster Support Daejun Park
     [not found]   ` <CGME20210524084345epcms2p63dde85f3fdc127c29d25ada7d7f539cb@epcms2p5>
2021-05-24  8:44     ` [PATCH v35 1/4] scsi: ufs: Introduce HPB feature Daejun Park
     [not found]   ` <CGME20210524084345epcms2p63dde85f3fdc127c29d25ada7d7f539cb@epcms2p2>
2021-05-24  8:45     ` [PATCH v35 3/4] scsi: ufs: Prepare HPB read for cached sub-region Daejun Park
2021-06-03 20:12       ` Bart Van Assche
     [not found]       ` <CGME20210524084345epcms2p63dde85f3fdc127c29d25ada7d7f539cb@epcms2p3>
2021-06-04  1:11         ` Daejun Park
2021-06-04  2:54           ` Bart Van Assche
2021-06-03 17:38   ` [PATCH v35 0/4] scsi: ufs: Add Host Performance Booster Support Greg KH
2021-06-03 17:47     ` Bart Van Assche
     [not found]   ` <CGME20210524084345epcms2p63dde85f3fdc127c29d25ada7d7f539cb@epcms2p7>
2021-05-24  8:45     ` [PATCH v35 2/4] scsi: ufs: L2P map management for HPB read Daejun Park
2021-06-04  4:06     ` Daejun Park [this message]
2021-05-24  8:46 ` [PATCH v35 4/4] scsi: ufs: Add HPB 2.0 support 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=20210604040636epcms2p7bcf940a2cd060336f79250de0060e08c@epcms2p7 \
    --to=daejun7.park@samsung.com \
    --cc=alim.akhtar@samsung.com \
    --cc=asutoshd@codeaurora.org \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=cang@codeaurora.org \
    --cc=d_hyun.kwon@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=huobean@gmail.com \
    --cc=j-young.choi@samsung.com \
    --cc=jaemyung.lee@samsung.com \
    --cc=javier.gonz@samsung.com \
    --cc=jejb@linux.ibm.com \
    --cc=jh.i.park@samsung.com \
    --cc=jieon.seol@samsung.com \
    --cc=keosung.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stanley.chu@mediatek.com \
    --cc=sungjun07.park@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).