diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-12-03 15:19:40 -0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-12-06 22:30:33 -0500 |
commit | bd0b35383193d0d31a0cce3d7c7f7e4be1cc7905 (patch) | |
tree | 1dd751ef443bdfe4d55576cedc38cc35dd064717 /drivers/scsi/ufs | |
parent | 21ad0e49085deb22c094f91f9da57319a97188e4 (diff) | |
download | linux-bd0b35383193d0d31a0cce3d7c7f7e4be1cc7905.tar.gz linux-bd0b35383193d0d31a0cce3d7c7f7e4be1cc7905.tar.bz2 linux-bd0b35383193d0d31a0cce3d7c7f7e4be1cc7905.zip |
scsi: ufs: Remove ufshcd_any_tag_in_use()
Use hba->outstanding_reqs instead of ufshcd_any_tag_in_use(). This patch
prepares for removal of the blk_mq_start_request() call from
ufshcd_wait_for_dev_cmd(). blk_mq_tagset_busy_iter() only iterates over
started requests.
Link: https://lore.kernel.org/r/20211203231950.193369-8-bvanassche@acm.org
Tested-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs')
-rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 04a19b826837..974bf47e733c 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -1352,25 +1352,6 @@ out: return ret; } -static bool ufshcd_is_busy(struct request *req, void *priv, bool reserved) -{ - int *busy = priv; - - WARN_ON_ONCE(reserved); - (*busy)++; - return false; -} - -/* Whether or not any tag is in use by a request that is in progress. */ -static bool ufshcd_any_tag_in_use(struct ufs_hba *hba) -{ - struct request_queue *q = hba->cmd_queue; - int busy = 0; - - blk_mq_tagset_busy_iter(q->tag_set, ufshcd_is_busy, &busy); - return busy; -} - static int ufshcd_devfreq_get_dev_status(struct device *dev, struct devfreq_dev_status *stat) { @@ -1769,7 +1750,7 @@ static void ufshcd_gate_work(struct work_struct *work) if (hba->clk_gating.active_reqs || hba->ufshcd_state != UFSHCD_STATE_OPERATIONAL - || ufshcd_any_tag_in_use(hba) || hba->outstanding_tasks + || hba->outstanding_reqs || hba->outstanding_tasks || hba->active_uic_cmd || hba->uic_async_done) goto rel_lock; |