linux/drivers/ufs/host
Manivannan Sadhasivam ea593e028a scsi: ufs: qcom: Add UFSHCD_QUIRK_BROKEN_LSDBS_CAP for SM8550 SoC
SM8550 SoC has the UFSHCI 4.0 compliant UFS controller and only supports
legacy single doorbell mode without MCQ. But due to a hardware bug, it
reports 1 in the 'Legacy Queue & Single Doorbell Support (LSDBS)' field of
the Controller Capabilities register. This field is supposed to read as 0
if legacy single doorbell mode is supported and 1 otherwise.

Starting with commit 0c60eb0cc3 ("scsi: ufs: core: Check LSDBS cap when
!mcq"), ufshcd driver is now relying on the LSDBS field to decide when to
use the legacy doorbell mode if MCQ is not supported. And this ends up
breaking UFS on SM8550:

ufshcd-qcom 1d84000.ufs: ufshcd_init: failed to initialize (legacy doorbell mode not supported)
ufshcd-qcom 1d84000.ufs: error -EINVAL: Initialization failed with error -22

So use the UFSHCD_QUIRK_BROKEN_LSDBS_CAP quirk for SM8550 SoC so that the
ufshcd driver could use legacy doorbell mode correctly.

Fixes: 0c60eb0cc3 ("scsi: ufs: core: Check LSDBS cap when !mcq")
Tested-by: Amit Pundir <amit.pundir@linaro.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20240816-ufs-bug-fix-v3-2-e6fe0e18e2a3@linaro.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2024-08-16 21:09:17 -04:00
..
cdns-pltfrm.c scsi: ufs: cdns-pltfrm: Perform read back after writing HCLKDIV 2024-04-05 21:06:29 -04:00
Kconfig scsi: ufs: ufs-mediatek: Add dependency for RESET_CONTROLLER 2023-07-05 21:40:53 -04:00
Makefile scsi: ufs: ufs-qcom: Switch to the new ICE API 2023-06-16 12:04:31 -04:00
tc-dwc-g210-pci.c scsi: ufs: Follow the kernel-doc syntax for documenting return values 2023-07-31 15:17:50 -04:00
tc-dwc-g210-pltfrm.c scsi: ufs: Convert all platform drivers to return void 2023-09-21 21:48:05 -04:00
tc-dwc-g210.c scsi: ufs: Fix kernel-doc headers 2023-07-31 15:17:50 -04:00
tc-dwc-g210.h
ti-j721e-ufs.c scsi: ufs: Convert all platform drivers to return void 2023-09-21 21:48:05 -04:00
ufs-exynos.c scsi: ufs: exynos: Don't resume FMP when crypto support is disabled 2024-07-22 20:52:15 -04:00
ufs-exynos.h scsi: ufs: exynos: Add support for Tensor gs101 SoC 2024-05-06 21:34:37 -04:00
ufs-hisi.c scsi: ufs: host: Rename structure ufs_dev_params to ufs_host_params 2023-12-13 22:37:20 -05:00
ufs-hisi.h
ufs-mediatek-sip.h scsi: ufs: mediatek: Support rtff in PM flow 2024-03-25 21:03:00 -04:00
ufs-mediatek-trace.h scsi: ufs: ufs-mediatek: Support clk-scaling to optimize power consumption 2022-08-22 22:58:30 -04:00
ufs-mediatek.c scsi: ufs: core: Inline is_mcq_enabled() 2024-07-10 22:19:05 -04:00
ufs-mediatek.h scsi: ufs: core: Maximum RTT supported by the host driver 2024-05-30 20:34:38 -04:00
ufs-qcom.c scsi: ufs: qcom: Add UFSHCD_QUIRK_BROKEN_LSDBS_CAP for SM8550 SoC 2024-08-16 21:09:17 -04:00
ufs-qcom.h scsi: ufs: qcom: Perform read back after writing reset bit 2024-04-05 21:06:28 -04:00
ufs-renesas.c scsi: ufs: Convert all platform drivers to return void 2023-09-21 21:48:05 -04:00
ufs-sprd.c scsi: ufs: Convert all platform drivers to return void 2023-09-21 21:48:05 -04:00
ufs-sprd.h scsi: ufs: ufs-unisoc: Add support for Unisoc UFS host controller 2023-01-11 21:17:18 -05:00
ufshcd-dwc.c scsi: ufs: Fix kernel-doc headers 2023-07-31 15:17:50 -04:00
ufshcd-dwc.h
ufshcd-pci.c scsi: ufs: ufs-pci: Add support for Intel Panther Lake 2024-06-26 23:21:10 -04:00
ufshcd-pltfrm.c SCSI misc on 20240110 2024-01-11 14:24:32 -08:00
ufshcd-pltfrm.h scsi: ufs: host: Rename structure ufs_dev_params to ufs_host_params 2023-12-13 22:37:20 -05:00
ufshci-dwc.h