scsi: ufs: wb: Change function name and parameter names
authorJinyoung Choi <j-young.choi@samsung.com>
Thu, 4 Aug 2022 07:50:58 +0000 (16:50 +0900)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 23 Aug 2022 03:15:10 +0000 (23:15 -0400)
Change the parameter names of ufshcd_wb_toggle_flush_during_h8() to match
the other toggle functions.

Link: https://lore.kernel.org/r/20220804075058epcms2p550c578d743fe0a94888b3d71cc9076d4@epcms2p5
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jinyoung Choi <j-young.choi@samsung.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd.c

index 1c535d6..e17b18a 100644 (file)
@@ -266,8 +266,9 @@ static int ufshcd_setup_vreg(struct ufs_hba *hba, bool on);
 static inline int ufshcd_config_vreg_hpm(struct ufs_hba *hba,
                                         struct ufs_vreg *vreg);
 static int ufshcd_try_to_abort_task(struct ufs_hba *hba, int tag);
-static void ufshcd_wb_toggle_flush_during_h8(struct ufs_hba *hba, bool set);
-static inline void ufshcd_wb_toggle_flush(struct ufs_hba *hba, bool enable);
+static void ufshcd_wb_toggle_buf_flush_during_h8(struct ufs_hba *hba,
+                                                bool enable);
+static void ufshcd_wb_toggle_buf_flush(struct ufs_hba *hba, bool enable);
 static void ufshcd_hba_vreg_set_lpm(struct ufs_hba *hba);
 static void ufshcd_hba_vreg_set_hpm(struct ufs_hba *hba);
 
@@ -287,16 +288,16 @@ static inline void ufshcd_disable_irq(struct ufs_hba *hba)
        }
 }
 
-static inline void ufshcd_wb_config(struct ufs_hba *hba)
+static void ufshcd_configure_wb(struct ufs_hba *hba)
 {
        if (!ufshcd_is_wb_allowed(hba))
                return;
 
        ufshcd_wb_toggle(hba, true);
 
-       ufshcd_wb_toggle_flush_during_h8(hba, true);
+       ufshcd_wb_toggle_buf_flush_during_h8(hba, true);
        if (!(hba->quirks & UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL))
-               ufshcd_wb_toggle_flush(hba, true);
+               ufshcd_wb_toggle_buf_flush(hba, true);
 }
 
 static void ufshcd_scsi_unblock_requests(struct ufs_hba *hba)
@@ -5776,22 +5777,23 @@ int ufshcd_wb_toggle(struct ufs_hba *hba, bool enable)
        return ret;
 }
 
-static void ufshcd_wb_toggle_flush_during_h8(struct ufs_hba *hba, bool set)
+static void ufshcd_wb_toggle_buf_flush_during_h8(struct ufs_hba *hba,
+                                                bool enable)
 {
        int ret;
 
-       ret = __ufshcd_wb_toggle(hba, set,
+       ret = __ufshcd_wb_toggle(hba, enable,
                        QUERY_FLAG_IDN_WB_BUFF_FLUSH_DURING_HIBERN8);
        if (ret) {
                dev_err(hba->dev, "%s: WB-Buf Flush during H8 %s failed: %d\n",
-                       __func__, set ? "enable" : "disable", ret);
+                       __func__, enable ? "enable" : "disable", ret);
                return;
        }
        dev_dbg(hba->dev, "%s WB-Buf Flush during H8 %s\n",
-                       __func__, set ? "enabled" : "disabled");
+                       __func__, enable ? "enabled" : "disabled");
 }
 
-static inline void ufshcd_wb_toggle_flush(struct ufs_hba *hba, bool enable)
+static void ufshcd_wb_toggle_buf_flush(struct ufs_hba *hba, bool enable)
 {
        int ret;
 
@@ -5841,9 +5843,9 @@ static bool ufshcd_wb_presrv_usrspc_keep_vcc_on(struct ufs_hba *hba,
 static void ufshcd_wb_force_disable(struct ufs_hba *hba)
 {
        if (!(hba->quirks & UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL))
-               ufshcd_wb_toggle_flush(hba, false);
+               ufshcd_wb_toggle_buf_flush(hba, false);
 
-       ufshcd_wb_toggle_flush_during_h8(hba, false);
+       ufshcd_wb_toggle_buf_flush_during_h8(hba, false);
        ufshcd_wb_toggle(hba, false);
        hba->caps &= ~UFSHCD_CAP_WB_EN;
 
@@ -8240,7 +8242,9 @@ static int ufshcd_probe_hba(struct ufs_hba *hba, bool init_dev_params)
         */
        ufshcd_set_active_icc_lvl(hba);
 
-       ufshcd_wb_config(hba);
+       /* Enable UFS Write Booster if supported */
+       ufshcd_configure_wb(hba);
+
        if (hba->ee_usr_mask)
                ufshcd_write_ee_control(hba);
        /* Enable Auto-Hibernate if configured */