lkml.org 
[lkml]   [2020]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v5 1/8] scsi: ufs: enable WriteBooster on some pre-3.1 UFS devices
Date
> 
> static void ufshcd_wb_probe(struct ufs_hba *hba, u8 *desc_buf)
> {
> + if (!ufshcd_is_wb_allowed(hba))
> + return;
> +
> + if (hba->desc_size.dev_desc <=
> DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP)
Should be
DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP + 4

> + goto wb_disabled;
> +
> hba->dev_info.d_ext_ufs_feature_sup =
> get_unaligned_be32(desc_buf +
> DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP);


>
> static int ufs_get_device_desc(struct ufs_hba *hba)
> @@ -6862,10 +6890,6 @@ static int ufs_get_device_desc(struct ufs_hba
> *hba)
>
> model_index = desc_buf[DEVICE_DESC_PARAM_PRDCT_NAME];
>
> - /* Enable WB only for UFS-3.1 */
> - if (dev_info->wspecversion >= 0x310)
> - ufshcd_wb_probe(hba, desc_buf);
> -
> err = ufshcd_read_string_desc(hba, model_index,
> &dev_info->model, SD_ASCII_STD);
> if (err < 0) {
> @@ -6874,6 +6898,16 @@ static int ufs_get_device_desc(struct ufs_hba
> *hba)
> goto out;
> }
>
> + ufs_fixup_device_setup(hba);
I don't think you should "hide" ufs_fixup_device_setup inside ufs_get_device_desc.

Thanks,
Avri

\
 
 \ /
  Last update: 2020-05-04 12:39    [W:0.121 / U:0.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site