@@ -723,6 +723,17 @@ static inline void ufshcd_outstanding_req_clear(struct ufs_hba *hba, int tag)
__clear_bit(tag, &hba->outstanding_reqs);
}
+/**
+ * ufshcd_outstanding_task_clear - Clear a bit in outstanding task field
+ * @hba: per adapter instance
+ * @tag: position of the bit to be cleared
+ */
+static inline void ufshcd_outstanding_task_clear(struct ufs_hba *hba, int tag)
+{
+ __clear_bit(tag, &hba->outstanding_tasks);
+ dev_info(hba->dev, "clear outstanding_tasks: %d\n", tag);
+}
+
/**
* ufshcd_get_lists_status - Check UCRDY, UTRLRDY and UTMRLRDY
* @reg: Register value of host controller status
@@ -5679,7 +5690,7 @@ static int __ufshcd_issue_tm_cmd(struct ufs_hba *hba,
ufshcd_add_tm_upiu_trace(hba, task_tag, "tm_complete");
spin_lock_irqsave(hba->host->host_lock, flags);
- __clear_bit(free_slot, &hba->outstanding_tasks);
+ ufshcd_outstanding_task_clear(hba, free_slot);
spin_unlock_irqrestore(hba->host->host_lock, flags);
}
Make a new function "ufshcd_outstanding_task_clear()" used to clear bits in hba->outstanding_tasks for future wider usage. Signed-off-by: Stanley Chu <stanley.chu@mediatek.com> --- drivers/scsi/ufs/ufshcd.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)