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 <mary@mary.zone>
Link: https://lore.kernel.org/r/20240818222442.44990-3-mary@mary.zone
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by Mary Guillemard and committed by Martin K. Petersen 0f9592ae 4f9eedfa

+3
+3
drivers/ufs/host/ufs-mediatek.c
··· 1026 1026 if (host->caps & UFS_MTK_CAP_DISABLE_AH8) 1027 1027 hba->caps |= UFSHCD_CAP_HIBERN8_WITH_CLK_GATING; 1028 1028 1029 + if (host->caps & UFS_MTK_CAP_DISABLE_MCQ) 1030 + hba->quirks |= UFSHCD_QUIRK_BROKEN_LSDBS_CAP; 1031 + 1029 1032 ufs_mtk_init_clocks(hba); 1030 1033 1031 1034 /*