* [PATCH] scsi: ufs: qcom: Fix ESI vector mask
@ 2023-12-14 12:55 Manivannan Sadhasivam
2023-12-14 13:01 ` Konrad Dybcio
2023-12-19 1:45 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Manivannan Sadhasivam @ 2023-12-14 12:55 UTC (permalink / raw)
To: andersson, konrad.dybcio, jejb, martin.petersen
Cc: linux-arm-msm, linux-scsi, linux-kernel, Manivannan Sadhasivam,
Andrew Halaney
While cleaning up the code to use ufshcd_rmwl() helper, the ESI vector mask
was changed incorrectly. Fix it and also define a proper macro for the
value together with FIELD_PREP().
Reported-by: Andrew Halaney <ahalaney@redhat.com>
Fixes: 0e9f4375db1c ("scsi: ufs: qcom: Use ufshcd_rmwl() where applicable")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
drivers/ufs/host/ufs-qcom.c | 4 +++-
drivers/ufs/host/ufs-qcom.h | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index d5cca5d3a98f..9fd8d737edea 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -1744,7 +1744,9 @@ static int ufs_qcom_config_esi(struct ufs_hba *hba)
} else {
if (host->hw_ver.major == 6 && host->hw_ver.minor == 0 &&
host->hw_ver.step == 0)
- ufshcd_rmwl(hba, ESI_VEC_MASK, 0x1f00, REG_UFS_CFG3);
+ ufshcd_rmwl(hba, ESI_VEC_MASK,
+ FIELD_PREP(ESI_VEC_MASK, MAX_ESI_VEC - 1),
+ REG_UFS_CFG3);
ufshcd_mcq_enable_esi(hba);
}
diff --git a/drivers/ufs/host/ufs-qcom.h b/drivers/ufs/host/ufs-qcom.h
index 9026fe243307..9dd9a391ebb7 100644
--- a/drivers/ufs/host/ufs-qcom.h
+++ b/drivers/ufs/host/ufs-qcom.h
@@ -15,6 +15,7 @@
#define HBRN8_POLL_TOUT_MS 100
#define DEFAULT_CLK_RATE_HZ 1000000
#define MAX_SUPP_MAC 64
+#define MAX_ESI_VEC 32
#define UFS_HW_VER_MAJOR_MASK GENMASK(31, 28)
#define UFS_HW_VER_MINOR_MASK GENMASK(27, 16)
base-commit: ed340d13aa1db6773667ed4bf907738df203fbda
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] scsi: ufs: qcom: Fix ESI vector mask
2023-12-14 12:55 [PATCH] scsi: ufs: qcom: Fix ESI vector mask Manivannan Sadhasivam
@ 2023-12-14 13:01 ` Konrad Dybcio
2023-12-19 1:45 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Konrad Dybcio @ 2023-12-14 13:01 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson, jejb, martin.petersen
Cc: linux-arm-msm, linux-scsi, linux-kernel, Andrew Halaney
On 12/14/23 13:55, Manivannan Sadhasivam wrote:
> While cleaning up the code to use ufshcd_rmwl() helper, the ESI vector mask
> was changed incorrectly. Fix it and also define a proper macro for the
> value together with FIELD_PREP().
>
> Reported-by: Andrew Halaney <ahalaney@redhat.com>
> Fixes: 0e9f4375db1c ("scsi: ufs: qcom: Use ufshcd_rmwl() where applicable")
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
Looks sound
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] scsi: ufs: qcom: Fix ESI vector mask
2023-12-14 12:55 [PATCH] scsi: ufs: qcom: Fix ESI vector mask Manivannan Sadhasivam
2023-12-14 13:01 ` Konrad Dybcio
@ 2023-12-19 1:45 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2023-12-19 1:45 UTC (permalink / raw)
To: Manivannan Sadhasivam
Cc: andersson, konrad.dybcio, jejb, martin.petersen, linux-arm-msm,
linux-scsi, linux-kernel, Andrew Halaney
Manivannan,
> While cleaning up the code to use ufshcd_rmwl() helper, the ESI vector mask
> was changed incorrectly. Fix it and also define a proper macro for the
> value together with FIELD_PREP().
Applied to 6.8/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-19 1:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-14 12:55 [PATCH] scsi: ufs: qcom: Fix ESI vector mask Manivannan Sadhasivam
2023-12-14 13:01 ` Konrad Dybcio
2023-12-19 1:45 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox