aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary Guillemard <[email protected]>2024-08-19 00:24:42 +0200
committerMartin K. Petersen <[email protected]>2024-08-28 21:29:20 -0400
commit0f9592ae26ffe044cfb2b2d071ccf4427be57ed4 (patch)
treec196c8f32f9cf9e5f61844d22abbe9fe46cdc447
parent4f9eedfa27ae5806ed10906bcceee7bae49c8941 (diff)
scsi: ufs: ufs-mediatek: Add UFSHCD_QUIRK_BROKEN_LSDBS_CAP
MT8183 implements the UFSHCI 2.1 spec but reports a bogus value of 1 in the reserved part for the Legacy Single Doorbell Support (LSDBS) capability. Set UFSHCD_QUIRK_BROKEN_LSDBS_CAP when MCQ support is explicitly disabled, allowing the device to be properly registered. Signed-off-by: Mary Guillemard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Peter Wang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r--drivers/ufs/host/ufs-mediatek.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
index 02c9064284e1..9a5919434c4e 100644
--- a/drivers/ufs/host/ufs-mediatek.c
+++ b/drivers/ufs/host/ufs-mediatek.c
@@ -1026,6 +1026,9 @@ static int ufs_mtk_init(struct ufs_hba *hba)
if (host->caps & UFS_MTK_CAP_DISABLE_AH8)
hba->caps |= UFSHCD_CAP_HIBERN8_WITH_CLK_GATING;
+ if (host->caps & UFS_MTK_CAP_DISABLE_MCQ)
+ hba->quirks |= UFSHCD_QUIRK_BROKEN_LSDBS_CAP;
+
ufs_mtk_init_clocks(hba);
/*