Skip to content

Commit 26cdd69

Browse files
Mani-Sadhasivammartinkpetersen
authored andcommitted
scsi: ufs: qcom: Fix ESI vector mask
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: 0e9f437 ("scsi: ufs: qcom: Use ufshcd_rmwl() where applicable") Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20231214125532.55109-1-manivannan.sadhasivam@linaro.org Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 24db962 commit 26cdd69

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

drivers/ufs/host/ufs-qcom.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1744,7 +1744,9 @@ static int ufs_qcom_config_esi(struct ufs_hba *hba)
17441744
} else {
17451745
if (host->hw_ver.major == 6 && host->hw_ver.minor == 0 &&
17461746
host->hw_ver.step == 0)
1747-
ufshcd_rmwl(hba, ESI_VEC_MASK, 0x1f00, REG_UFS_CFG3);
1747+
ufshcd_rmwl(hba, ESI_VEC_MASK,
1748+
FIELD_PREP(ESI_VEC_MASK, MAX_ESI_VEC - 1),
1749+
REG_UFS_CFG3);
17481750
ufshcd_mcq_enable_esi(hba);
17491751
}
17501752

drivers/ufs/host/ufs-qcom.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#define HBRN8_POLL_TOUT_MS 100
1616
#define DEFAULT_CLK_RATE_HZ 1000000
1717
#define MAX_SUPP_MAC 64
18+
#define MAX_ESI_VEC 32
1819

1920
#define UFS_HW_VER_MAJOR_MASK GENMASK(31, 28)
2021
#define UFS_HW_VER_MINOR_MASK GENMASK(27, 16)

0 commit comments

Comments
 (0)