public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: ufs: core: Fix setup_xfer_req invocation
@ 2024-02-20  9:08 Rohit Ner
  2024-02-20 17:21 ` Bart Van Assche
  0 siblings, 1 reply; 10+ messages in thread
From: Rohit Ner @ 2024-02-20  9:08 UTC (permalink / raw)
  To: Can Guo, Bean Huo, Stanley Chu, Martin K. Petersen
  Cc: Avri Altman, linux-scsi, linux-kernel, Rohit Ner

Allow variant callback to setup transfers without
restricting the transfers to use legacy doorbell

Signed-off-by: Rohit Ner <rohitner@google.com>
---
 drivers/ufs/core/ufshcd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index d77b25b79ae3..91e483dd3974 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -2280,6 +2280,9 @@ void ufshcd_send_command(struct ufs_hba *hba, unsigned int task_tag,
 		ufshcd_clk_scaling_start_busy(hba);
 	if (unlikely(ufshcd_should_inform_monitor(hba, lrbp)))
 		ufshcd_start_monitor(hba, lrbp);
+	if (hba->vops && hba->vops->setup_xfer_req)
+		hba->vops->setup_xfer_req(hba, lrbp->task_tag,
+						!!lrbp->cmd);
 
 	if (is_mcq_enabled(hba)) {
 		int utrd_size = sizeof(struct utp_transfer_req_desc);
@@ -2293,9 +2296,6 @@ void ufshcd_send_command(struct ufs_hba *hba, unsigned int task_tag,
 		spin_unlock(&hwq->sq_lock);
 	} else {
 		spin_lock_irqsave(&hba->outstanding_lock, flags);
-		if (hba->vops && hba->vops->setup_xfer_req)
-			hba->vops->setup_xfer_req(hba, lrbp->task_tag,
-						  !!lrbp->cmd);
 		__set_bit(lrbp->task_tag, &hba->outstanding_reqs);
 		ufshcd_writel(hba, 1 << lrbp->task_tag,
 			      REG_UTP_TRANSFER_REQ_DOOR_BELL);
-- 
2.44.0.rc0.258.g7320e95886-goog


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-01-07 10:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-20  9:08 [PATCH] scsi: ufs: core: Fix setup_xfer_req invocation Rohit Ner
2024-02-20 17:21 ` Bart Van Assche
     [not found]   ` <CAGt9f=Qd8P4OUuT=KJQqpwJPYVB7zeCJjWn_4CTiXWce6ZRERg@mail.gmail.com>
2024-02-20 18:19     ` Bart Van Assche
2024-02-21  9:13   ` Can Guo
2024-02-21 17:55     ` Bart Van Assche
2024-02-22  2:05       ` Can Guo
2024-02-22  3:09         ` Bart Van Assche
2024-02-22  8:27     ` Rohit Ner
2024-02-22 15:25       ` Bart Van Assche
2025-01-07 10:23         ` Rohit Ner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox