diff --git a/arch/arm64/configs/vendor/ext_config/moto-holi-denver.config b/arch/arm64/configs/vendor/ext_config/moto-holi-denver.config index a3ac4fce713b..a576b69483e6 100644 --- a/arch/arm64/configs/vendor/ext_config/moto-holi-denver.config +++ b/arch/arm64/configs/vendor/ext_config/moto-holi-denver.config @@ -24,3 +24,6 @@ CONFIG_ZRAM_WRITEBACK=y # CONFIG_UFSHPB is not set # CONFIG_UFSTW is not set # CONFIG_SCSI_SKHPB is not set +# CONFIG_UFSTW_IGNORE_GUARANTEE_BIT is not set +# CONFIG_UFSTW_BOOT_ENABLED is not set +# CONFIG_MICRON_HPB is not set diff --git a/arch/arm64/configs/vendor/ext_config/moto-holi-ibiza.config b/arch/arm64/configs/vendor/ext_config/moto-holi-ibiza.config index 62cecda746ec..4381a9d7398e 100644 --- a/arch/arm64/configs/vendor/ext_config/moto-holi-ibiza.config +++ b/arch/arm64/configs/vendor/ext_config/moto-holi-ibiza.config @@ -22,3 +22,6 @@ CONFIG_ZRAM_WRITEBACK=y # CONFIG_UFSHPB is not set # CONFIG_UFSTW is not set # CONFIG_SCSI_SKHPB is not set +# CONFIG_UFSTW_IGNORE_GUARANTEE_BIT is not set +# CONFIG_UFSTW_BOOT_ENABLED is not set +# CONFIG_MICRON_HPB is not set diff --git a/arch/arm64/configs/vendor/holi_QGKI.config b/arch/arm64/configs/vendor/holi_QGKI.config index eeefbf2a14fa..29c1ff5a3e5d 100644 --- a/arch/arm64/configs/vendor/holi_QGKI.config +++ b/arch/arm64/configs/vendor/holi_QGKI.config @@ -202,4 +202,7 @@ CONFIG_QTI_DEVFREQ_VDD_COOLING_DEVICE=y CONFIG_UFSFEATURE=y CONFIG_UFSHPB=y CONFIG_UFSTW=y +CONFIG_UFSTW_IGNORE_GUARANTEE_BIT=y +CONFIG_UFSTW_BOOT_ENABLED=y CONFIG_SCSI_SKHPB=y +CONFIG_MICRON_HPB=y diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 16bbe73f36fb..c946df276b66 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -7487,6 +7487,13 @@ static void ufshcd_wb_probe(struct ufs_hba *hba, u8 *desc_buf) goto wb_disabled; } +#if defined(CONFIG_UFSTW) + //disable write booster for samsung ufs. turbo write feature is used on samsung v6 or v5 ufs. + if (dev_info->wmanufacturerid == UFS_VENDOR_SAMSUNG) { + dev_err(hba->dev, "%s: it is samsung ufs, just disable wb, will enable TW.wb_disable \n",__func__); + goto wb_disabled; + } +#endif /* * WB may be supported but not configured while provisioning. * The spec says, in dedicated wb buffer mode, @@ -9863,7 +9870,6 @@ static int get_storage_info(struct ufs_hba *hba) struct property *p; struct device_node *n; struct storage_info *info; - unsigned int mfrid; n = of_find_node_by_path("/chosen/mmi,storage"); if (n == NULL) { @@ -9894,8 +9900,7 @@ static int get_storage_info(struct ufs_hba *hba) of_node_put(n); - mfrid = simple_strtol(info->card_manufacturer, NULL, 16); - dev_info(hba->dev, "manufacturer parsed from choosen is %s\n",mfrid); + dev_info(hba->dev, "manufacturer parsed from choosen is %s\n",info->card_manufacturer); err: return ret; } diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index b292854b0d78..0273ec1dcc8a 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -1160,11 +1160,7 @@ static inline bool ufshcd_is_auto_hibern8_enabled(struct ufs_hba *hba) static inline bool ufshcd_is_wb_allowed(struct ufs_hba *hba) { -#if defined(CONFIG_UFSTW) - return false; -#else return hba->caps & UFSHCD_CAP_WB_EN; -#endif } #define ufshcd_writel(hba, val, reg) \