File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 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)
266266
267267static bool ufshcd_is_ufs_dev_busy (struct ufs_hba * hba )
268268{
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 );
271270}
272271
273272static const struct ufs_dev_quirk ufs_fixups [] = {
@@ -1949,7 +1948,9 @@ static void ufshcd_gate_work(struct work_struct *work)
19491948 goto rel_lock ;
19501949 }
19511950
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 )
19531954 goto rel_lock ;
19541955
19551956 spin_unlock_irqrestore (hba -> host -> host_lock , flags );
@@ -8226,7 +8227,9 @@ static void ufshcd_rtc_work(struct work_struct *work)
82268227 hba = container_of (to_delayed_work (work ), struct ufs_hba , ufs_rtc_update_work );
82278228
82288229 /* 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 )
82308233 ufshcd_update_rtc (hba );
82318234
82328235 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