File tree 1 file changed +7
-4
lines changed 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -266,8 +266,7 @@ static bool ufshcd_has_pending_tasks(struct ufs_hba *hba)
266
266
267
267
static bool ufshcd_is_ufs_dev_busy (struct ufs_hba * hba )
268
268
{
269
- return hba -> clk_gating .active_reqs || hba -> outstanding_reqs ||
270
- ufshcd_has_pending_tasks (hba );
269
+ return hba -> outstanding_reqs || ufshcd_has_pending_tasks (hba );
271
270
}
272
271
273
272
static const struct ufs_dev_quirk ufs_fixups [] = {
@@ -1949,7 +1948,9 @@ static void ufshcd_gate_work(struct work_struct *work)
1949
1948
goto rel_lock ;
1950
1949
}
1951
1950
1952
- if (ufshcd_is_ufs_dev_busy (hba ) || hba -> ufshcd_state != UFSHCD_STATE_OPERATIONAL )
1951
+ if (ufshcd_is_ufs_dev_busy (hba ) ||
1952
+ hba -> ufshcd_state != UFSHCD_STATE_OPERATIONAL ||
1953
+ hba -> clk_gating .active_reqs )
1953
1954
goto rel_lock ;
1954
1955
1955
1956
spin_unlock_irqrestore (hba -> host -> host_lock , flags );
@@ -8226,7 +8227,9 @@ static void ufshcd_rtc_work(struct work_struct *work)
8226
8227
hba = container_of (to_delayed_work (work ), struct ufs_hba , ufs_rtc_update_work );
8227
8228
8228
8229
/* Update RTC only when there are no requests in progress and UFSHCI is operational */
8229
- if (!ufshcd_is_ufs_dev_busy (hba ) && hba -> ufshcd_state == UFSHCD_STATE_OPERATIONAL )
8230
+ if (!ufshcd_is_ufs_dev_busy (hba ) &&
8231
+ hba -> ufshcd_state == UFSHCD_STATE_OPERATIONAL &&
8232
+ !hba -> clk_gating .active_reqs )
8230
8233
ufshcd_update_rtc (hba );
8231
8234
8232
8235
if (ufshcd_is_ufs_dev_active (hba ) && hba -> dev_info .rtc_update_period )
You can’t perform that action at this time.
0 commit comments