File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -258,10 +258,16 @@ ufs_get_desired_pm_lvl_for_dev_link_state(enum ufs_dev_pwr_mode dev_state,
258
258
return UFS_PM_LVL_0 ;
259
259
}
260
260
261
+ static bool ufshcd_has_pending_tasks (struct ufs_hba * hba )
262
+ {
263
+ return hba -> outstanding_tasks || hba -> active_uic_cmd ||
264
+ hba -> uic_async_done ;
265
+ }
266
+
261
267
static bool ufshcd_is_ufs_dev_busy (struct ufs_hba * hba )
262
268
{
263
- return ( hba -> clk_gating .active_reqs || hba -> outstanding_reqs || hba -> outstanding_tasks ||
264
- hba -> active_uic_cmd || hba -> uic_async_done );
269
+ return hba -> clk_gating .active_reqs || hba -> outstanding_reqs ||
270
+ ufshcd_has_pending_tasks ( hba );
265
271
}
266
272
267
273
static const struct ufs_dev_quirk ufs_fixups [] = {
@@ -1999,8 +2005,7 @@ static void __ufshcd_release(struct ufs_hba *hba)
1999
2005
2000
2006
if (hba -> clk_gating .active_reqs || hba -> clk_gating .is_suspended ||
2001
2007
hba -> ufshcd_state != UFSHCD_STATE_OPERATIONAL ||
2002
- hba -> outstanding_tasks || !hba -> clk_gating .is_initialized ||
2003
- hba -> active_uic_cmd || hba -> uic_async_done ||
2008
+ ufshcd_has_pending_tasks (hba ) || !hba -> clk_gating .is_initialized ||
2004
2009
hba -> clk_gating .state == CLKS_OFF )
2005
2010
return ;
2006
2011
You can’t perform that action at this time.
0 commit comments