lkml.org 
[lkml]   [2021]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v32 4/4] scsi: ufs: Add HPB 2.0 support
Date
Hi,
> if (dev_info->wspecversion >= UFS_DEV_HPB_SUPPORT_VERSION &&
> (b_ufs_feature_sup & UFS_DEV_HPB_SUPPORT)) {
> - dev_info->hpb_enabled = true;
> + bool hpb_en = false;
> +
> ufshpb_get_dev_info(hba, desc_buf);
> +
> + if (!ufshpb_is_legacy(hba))
> + err = ufshcd_query_flag_retry(hba,
> + UPIU_QUERY_OPCODE_READ_FLAG,
> + QUERY_FLAG_IDN_HPB_EN, 0,
> + &hpb_en);
> +
> + if (ufshpb_is_legacy(hba) || (!err && hpb_en))
> + dev_info->hpb_enabled = true;
> }
I think there is a confusion concerning fHPBEn flag.
The spec say: "If host wants to enable HPB, host set the fHPBEn flag as ‘1’."
And its default value is '0'.
So upon successful init, we should set this flag and not read it.

I wouldn't rush to fix it however, before we see what Martin/Greg are planning for this feature.
Thanks,
Avri
\
 
 \ /
  Last update: 2021-04-19 09:21    [W:0.102 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site