diff mbox series

[v3,17/17] ufs: qcom-host: Enable multi circular queue capability

Message ID 4d21c867708a9d37e53293510d81013088d01c39.1666288432.git.quic_asutoshd@quicinc.com (mailing list archive)
State Superseded
Headers show
Series Add Multi Circular Queue Support | expand

Commit Message

Asutosh Das Oct. 20, 2022, 6:03 p.m. UTC
Enable MCQ for Qualcomm UFS controllers

Signed-off-by: Asutosh Das <quic_asutoshd@quicinc.com>
---
 drivers/ufs/host/ufs-qcom.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Bart Van Assche Oct. 28, 2022, 10:08 p.m. UTC | #1
On 10/20/22 11:03, Asutosh Das wrote:
> diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
> index 36c40210..b740299 100644
> --- a/drivers/ufs/host/ufs-qcom.c
> +++ b/drivers/ufs/host/ufs-qcom.c
> @@ -853,6 +853,7 @@ static void ufs_qcom_set_caps(struct ufs_hba *hba)
>   	hba->caps |= UFSHCD_CAP_CRYPTO;
>   	hba->caps |= UFSHCD_CAP_AGGR_POWER_COLLAPSE;
>   	hba->caps |= UFSHCD_CAP_RPM_AUTOSUSPEND;
> +	hba->caps |= UFSHCD_CAP_MCQ_EN;

Shouldn't we have a flag that disables MCQ rather than a flag that 
enables MCQ? Otherwise the above line will be duplicated in every single 
host controller driver that supports MCQ.

Thanks,

Bart.
Asutosh Das Nov. 1, 2022, 6:47 p.m. UTC | #2
On Fri, Oct 28 2022 at 15:08 -0700, Bart Van Assche wrote:
>On 10/20/22 11:03, Asutosh Das wrote:
>>diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
>>index 36c40210..b740299 100644
>>--- a/drivers/ufs/host/ufs-qcom.c
>>+++ b/drivers/ufs/host/ufs-qcom.c
>>@@ -853,6 +853,7 @@ static void ufs_qcom_set_caps(struct ufs_hba *hba)
>>  	hba->caps |= UFSHCD_CAP_CRYPTO;
>>  	hba->caps |= UFSHCD_CAP_AGGR_POWER_COLLAPSE;
>>  	hba->caps |= UFSHCD_CAP_RPM_AUTOSUSPEND;
>>+	hba->caps |= UFSHCD_CAP_MCQ_EN;
>
>Shouldn't we have a flag that disables MCQ rather than a flag that 
>enables MCQ? Otherwise the above line will be duplicated in every 
>single host controller driver that supports MCQ.
>
Thanks, that makes sense.
I will drop this change and add a cap to disable MCQ via module parameter.

>Thanks,
>
>Bart.

-asd
diff mbox series

Patch

diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index 36c40210..b740299 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -853,6 +853,7 @@  static void ufs_qcom_set_caps(struct ufs_hba *hba)
 	hba->caps |= UFSHCD_CAP_CRYPTO;
 	hba->caps |= UFSHCD_CAP_AGGR_POWER_COLLAPSE;
 	hba->caps |= UFSHCD_CAP_RPM_AUTOSUSPEND;
+	hba->caps |= UFSHCD_CAP_MCQ_EN;
 
 	if (host->hw_ver.major >= 0x2) {
 		host->caps = UFS_QCOM_CAP_QUNIPRO |