mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daejun Park <daejun7.park@samsung.com>
To: Avri Altman <avri.altman@wdc.com>,
	"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
	"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>,
	Bart Van Assche <bvanassche@acm.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Bean Huo <beanhuo@micron.com>,
	Daejun Park <daejun7.park@samsung.com>,
	James Bottomley <James.Bottomley@HansenPartnership.com>
Subject: RE: [PATCH v2] scsi: ufshpb: Opt out pre-reqs from HPB2.0 flows
Date: Sat, 30 Oct 2021 07:30:07 +0900	[thread overview]
Message-ID: <1891546521.01635546902168.JavaMail.epsvc@epcpadp3> (raw)
In-Reply-To: <20211029193002.4187-1-avri.altman@wdc.com>

Hi Avri,
 
> @@ -1841,13 +1575,7 @@ static void ufshpb_lu_parameter_init(struct ufs_hba *hba,
>          u32 entries_per_rgn;
>          u64 rgn_mem_size, tmp;
>  
> -        /* for pre_req */
> -        hpb->pre_req_min_tr_len = hpb_dev_info->max_hpb_single_cmd + 1;
> -
> -        if (ufshpb_is_legacy(hba))
> -                hpb->pre_req_max_tr_len = HPB_LEGACY_CHUNK_HIGH;
> -        else
> -                hpb->pre_req_max_tr_len = HPB_MULTI_CHUNK_HIGH;
> +        hpb->pre_req_max_tr_len = HPB_LEGACY_CHUNK_HIGH;

They are should be not changed, because it makes ufshpb_is_supported_chunk()
determine to non-HPB READ when the its size is bigger than 4KB.

>  
>          hpb->cur_read_id = 0;
>  
> @@ -2858,8 +2586,7 @@ void ufshpb_get_geo_info(struct ufs_hba *hba, u8 *geo_buf)
>  void ufshpb_get_dev_info(struct ufs_hba *hba, u8 *desc_buf)
>  {
>          struct ufshpb_dev_info *hpb_dev_info = &hba->ufshpb_dev;
> -        int version, ret;
> -        u32 max_hpb_single_cmd = HPB_MULTI_CHUNK_LOW;
> +        int version;
>  
>          hpb_dev_info->control_mode = desc_buf[DEVICE_DESC_PARAM_HPB_CONTROL];
>  
> @@ -2875,13 +2602,6 @@ void ufshpb_get_dev_info(struct ufs_hba *hba, u8 *desc_buf)
>          if (version == HPB_SUPPORT_LEGACY_VERSION)
>                  hpb_dev_info->is_legacy = true;
>  
> -        ret = ufshcd_query_attr_retry(hba, UPIU_QUERY_OPCODE_READ_ATTR,
> -                QUERY_ATTR_IDN_MAX_HPB_SINGLE_CMD, 0, 0, &max_hpb_single_cmd);
> -        if (ret)
> -                dev_err(hba->dev, "%s: idn: read max size of single hpb cmd query request failed",
> -                        __func__);
> -        hpb_dev_info->max_hpb_single_cmd = max_hpb_single_cmd;
> -
>          /*
>           * Get the number of user logical unit to check whether all
>           * scsi_device finish initialization
> diff --git a/drivers/scsi/ufs/ufshpb.h b/drivers/scsi/ufs/ufshpb.h
> index a79e07398970..a4e7e33d451e 100644
> --- a/drivers/scsi/ufs/ufshpb.h
> +++ b/drivers/scsi/ufs/ufshpb.h
> @@ -31,8 +31,6 @@
>  
>  /* hpb support chunk size */
>  #define HPB_LEGACY_CHUNK_HIGH                        1
> -#define HPB_MULTI_CHUNK_LOW                        7
> -#define HPB_MULTI_CHUNK_HIGH                        255

Because of above issue, they should be remained.

Thanks,
Daejun

  parent reply	other threads:[~2021-10-29 22:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 19:30 Avri Altman
     [not found] ` <CGME20211029193014epcas2p10300c03ccf0337f9dd3653f29e2057d1@epcms2p1>
2021-10-29 22:30   ` Daejun Park [this message]
2021-10-29 23:47     ` Avri Altman

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=1891546521.01635546902168.JavaMail.epsvc@epcpadp3 \
    --to=daejun7.park@samsung.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=adrian.hunter@intel.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=jejb@linux.vnet.ibm.com \
    --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®