@@ -6068,7 +6068,7 @@ int ufshcd_wb_toggle_buf_flush(struct ufs_hba *hba, bool enable)
6068
6068
return ret ;
6069
6069
}
6070
6070
6071
- static bool ufshcd_wb_presrv_usrspc_keep_vcc_on (struct ufs_hba * hba ,
6071
+ static bool ufshcd_wb_curr_buff_threshold_check (struct ufs_hba * hba ,
6072
6072
u32 avail_buf )
6073
6073
{
6074
6074
u32 cur_buf ;
@@ -6150,15 +6150,13 @@ static bool ufshcd_wb_need_flush(struct ufs_hba *hba)
6150
6150
}
6151
6151
6152
6152
/*
6153
- * The ufs device needs the vcc to be ON to flush.
6154
6153
* With user-space reduction enabled, it's enough to enable flush
6155
6154
* by checking only the available buffer. The threshold
6156
6155
* defined here is > 90% full.
6157
6156
* With user-space preserved enabled, the current-buffer
6158
6157
* should be checked too because the wb buffer size can reduce
6159
6158
* when disk tends to be full. This info is provided by current
6160
- * buffer (dCurrentWriteBoosterBufferSize). There's no point in
6161
- * keeping vcc on when current buffer is empty.
6159
+ * buffer (dCurrentWriteBoosterBufferSize).
6162
6160
*/
6163
6161
index = ufshcd_wb_get_query_index (hba );
6164
6162
ret = ufshcd_query_attr_retry (hba , UPIU_QUERY_OPCODE_READ_ATTR ,
@@ -6173,7 +6171,7 @@ static bool ufshcd_wb_need_flush(struct ufs_hba *hba)
6173
6171
if (!hba -> dev_info .b_presrv_uspc_en )
6174
6172
return avail_buf <= UFS_WB_BUF_REMAIN_PERCENT (10 );
6175
6173
6176
- return ufshcd_wb_presrv_usrspc_keep_vcc_on (hba , avail_buf );
6174
+ return ufshcd_wb_curr_buff_threshold_check (hba , avail_buf );
6177
6175
}
6178
6176
6179
6177
static void ufshcd_rpm_dev_flush_recheck_work (struct work_struct * work )
0 commit comments