From: Bart Van Assche Date: Mon, 8 Jul 2024 21:16:02 +0000 (-0700) Subject: scsi: ufs: mcq: Move the "hba->mcq_enabled = true" assignment X-Git-Tag: v6.11-rc1~112^2~4^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a8c859b44da0040a02fb12aec3384f6279c17d7;p=thirdparty%2Fkernel%2Flinux.git scsi: ufs: mcq: Move the "hba->mcq_enabled = true" assignment Move the "hba->mcq_enabled = true" assignment to prevent that it gets duplicated by a later patch that will introduce more ufshcd_mcq_enable() calls. No functionality is changed by this patch. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240708211716.2827751-8-bvanassche@acm.org Reviewed-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen --- diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c index 4bcae410c2681..0a9597a6d0592 100644 --- a/drivers/ufs/core/ufs-mcq.c +++ b/drivers/ufs/core/ufs-mcq.c @@ -416,6 +416,7 @@ EXPORT_SYMBOL_GPL(ufshcd_mcq_enable_esi); void ufshcd_mcq_enable(struct ufs_hba *hba) { ufshcd_rmwl(hba, MCQ_MODE_SELECT, MCQ_MODE_SELECT, REG_UFS_MEM_CFG); + hba->mcq_enabled = true; } EXPORT_SYMBOL_GPL(ufshcd_mcq_enable); diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index a40b0bf2922e7..c96c57fe58344 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -8703,7 +8703,6 @@ static void ufshcd_config_mcq(struct ufs_hba *hba) ufshcd_mcq_config_mac(hba, hba->nutrs); ufshcd_mcq_enable(hba); - hba->mcq_enabled = true; dev_info(hba->dev, "MCQ configured, nr_queues=%d, io_queues=%d, read_queue=%d, poll_queues=%d, queue_depth=%d\n", hba->nr_hw_queues, hba->nr_queues[HCTX_TYPE_DEFAULT],