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 @@ -235,6 +235,12 @@ ufs_get_desired_pm_lvl_for_dev_link_state(enum ufs_dev_pwr_mode dev_state,
235
235
return UFS_PM_LVL_0 ;
236
236
}
237
237
238
+ static bool ufshcd_is_ufs_dev_busy (struct ufs_hba * hba )
239
+ {
240
+ return (hba -> clk_gating .active_reqs || hba -> outstanding_reqs || hba -> outstanding_tasks ||
241
+ hba -> active_uic_cmd || hba -> uic_async_done );
242
+ }
243
+
238
244
static const struct ufs_dev_quirk ufs_fixups [] = {
239
245
/* UFS cards deviations table */
240
246
{ .wmanufacturerid = UFS_VENDOR_MICRON ,
@@ -1917,10 +1923,7 @@ static void ufshcd_gate_work(struct work_struct *work)
1917
1923
goto rel_lock ;
1918
1924
}
1919
1925
1920
- if (hba -> clk_gating .active_reqs
1921
- || hba -> ufshcd_state != UFSHCD_STATE_OPERATIONAL
1922
- || hba -> outstanding_reqs || hba -> outstanding_tasks
1923
- || hba -> active_uic_cmd || hba -> uic_async_done )
1926
+ if (ufshcd_is_ufs_dev_busy (hba ) || hba -> ufshcd_state != UFSHCD_STATE_OPERATIONAL )
1924
1927
goto rel_lock ;
1925
1928
1926
1929
spin_unlock_irqrestore (hba -> host -> host_lock , flags );
You can’t perform that action at this time.
0 commit comments