lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 30 Oct 2021 07:30:07 +0900
From:   Daejun Park <daejun7.park@...sung.com>
To:     Avri Altman <avri.altman@....com>,
        "James E . J . Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>
CC:     "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Bart Van Assche <bvanassche@....org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Bean Huo <beanhuo@...ron.com>,
        Daejun Park <daejun7.park@...sung.com>,
        James Bottomley <James.Bottomley@...senPartnership.com>
Subject: RE: [PATCH v2] scsi: ufshpb: Opt out pre-reqs from HPB2.0 flows

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

Powered by blists - more mailing lists