diff mbox series

scsi: ufs: core: Restore SM8650 support

Message ID 20241106181011.4132974-1-bvanassche@acm.org (mailing list archive)
State Under Review
Headers show
Series scsi: ufs: core: Restore SM8650 support | expand

Commit Message

Bart Van Assche Nov. 6, 2024, 6:10 p.m. UTC
Some early UFSHCI 4.0 controllers support the UFSHCI 3.0 register set.
The UFSHCD_QUIRK_BROKEN_LSDBS_CAP quirk must be set for these controllers.
Commit b92e5937e352 ("scsi: ufs: core: Move code out of an if-statement")
changed the behavior for these controllers from working fine into
"ufshcd_add_scsi_host: failed to initialize (legacy doorbell mode not
supported)". Fix this by setting the "broken LSDBS" quirk for the
SM8650 development board.

Reported-by: Neil Armstrong <neil.armstrong@linaro.org>
Closes: https://lore.kernel.org/linux-scsi/0c0bc528-fdc2-4106-bc99-f23ae377f6f5@linaro.org/
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-QRD
Fixes: b92e5937e352 ("scsi: ufs: core: Move code out of an if-statement")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/ufs/host/ufs-qcom.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Martin K. Petersen Nov. 7, 2024, 2:12 a.m. UTC | #1
Bart,

> Some early UFSHCI 4.0 controllers support the UFSHCI 3.0 register set.
> The UFSHCD_QUIRK_BROKEN_LSDBS_CAP quirk must be set for these controllers.
> Commit b92e5937e352 ("scsi: ufs: core: Move code out of an if-statement")
> changed the behavior for these controllers from working fine into
> "ufshcd_add_scsi_host: failed to initialize (legacy doorbell mode not
> supported)". Fix this by setting the "broken LSDBS" quirk for the
> SM8650 development board.

Applied to 6.13/scsi-staging, thanks!
diff mbox series

Patch

diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index a5a0646bb80a..3b592492e152 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -874,7 +874,8 @@  static void ufs_qcom_advertise_quirks(struct ufs_hba *hba)
 	if (host->hw_ver.major > 0x3)
 		hba->quirks |= UFSHCD_QUIRK_REINIT_AFTER_MAX_GEAR_SWITCH;
 
-	if (of_device_is_compatible(hba->dev->of_node, "qcom,sm8550-ufshc"))
+	if (of_device_is_compatible(hba->dev->of_node, "qcom,sm8550-ufshc") ||
+	    of_device_is_compatible(hba->dev->of_node, "qcom,sm8650-ufshc"))
 		hba->quirks |= UFSHCD_QUIRK_BROKEN_LSDBS_CAP;
 }