Skip to content

Commit 7e2c268

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: ufs: mcq: Move the ufshcd_mcq_enable() call
Move the ufshcd_mcq_enable() call from inside ufshcd_config_mcq() to the callers of this function. No functionality is changed by this patch. This patch makes a later patch easier to read ("scsi: ufs: Make .get_hba_mac() optional"). Cc: Peter Wang <[email protected]> Cc: Manivannan Sadhasivam <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 4a8c859 commit 7e2c268

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/ufs/core/ufshcd.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8702,8 +8702,6 @@ static void ufshcd_config_mcq(struct ufs_hba *hba)
87028702
ufshcd_mcq_make_queues_operational(hba);
87038703
ufshcd_mcq_config_mac(hba, hba->nutrs);
87048704

8705-
ufshcd_mcq_enable(hba);
8706-
87078705
dev_info(hba->dev, "MCQ configured, nr_queues=%d, io_queues=%d, read_queue=%d, poll_queues=%d, queue_depth=%d\n",
87088706
hba->nr_hw_queues, hba->nr_queues[HCTX_TYPE_DEFAULT],
87098707
hba->nr_queues[HCTX_TYPE_READ], hba->nr_queues[HCTX_TYPE_POLL],
@@ -8731,8 +8729,10 @@ static int ufshcd_device_init(struct ufs_hba *hba, bool init_dev_params)
87318729
ufshcd_set_link_active(hba);
87328730

87338731
/* Reconfigure MCQ upon reset */
8734-
if (hba->mcq_enabled && !init_dev_params)
8732+
if (hba->mcq_enabled && !init_dev_params) {
87358733
ufshcd_config_mcq(hba);
8734+
ufshcd_mcq_enable(hba);
8735+
}
87368736

87378737
/* Verify device initialization by sending NOP OUT UPIU */
87388738
ret = ufshcd_verify_dev_init(hba);
@@ -8756,6 +8756,7 @@ static int ufshcd_device_init(struct ufs_hba *hba, bool init_dev_params)
87568756
ret = ufshcd_alloc_mcq(hba);
87578757
if (!ret) {
87588758
ufshcd_config_mcq(hba);
8759+
ufshcd_mcq_enable(hba);
87598760
} else {
87608761
/* Continue with SDB mode */
87618762
use_mcq_mode = false;
@@ -8771,6 +8772,7 @@ static int ufshcd_device_init(struct ufs_hba *hba, bool init_dev_params)
87718772
} else if (is_mcq_supported(hba)) {
87728773
/* UFSHCD_QUIRK_REINIT_AFTER_MAX_GEAR_SWITCH is set */
87738774
ufshcd_config_mcq(hba);
8775+
ufshcd_mcq_enable(hba);
87748776
}
87758777
}
87768778

0 commit comments

Comments
 (0)