Skip to contentSkip to conversation

scsi: ufs: core: Restore SM8650 support

PATCH Applied Bart Van Assche 4 participants 5 messages Nov 6, 2024 – Nov 14, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: ufs: core: Restore SM8650 support

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.

---
 drivers/ufs/host/ufs-qcom.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/ufs/host/ufs-qcom.c +2 -1
index a5a0646bb80a..3b592492e152 100644
@@ -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;
 }
 
#1 lore raw

Bart,

Quoted 7 lines

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!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
Reviewed-by on v1 1/1
#2 lore raw
In reply to Bart Van Assche
Quoted 8 lines · Bart Van Assche

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.

Quoted 6 lines

- Mani

Quoted 18 lines
---
 drivers/ufs/host/ufs-qcom.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/ufs/host/ufs-qcom.c +2 -1
index a5a0646bb80a..3b592492e152 100644
@@ -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;
 }
 
Signature · 1 line
மணிவண்ணன் சதாசிவம்
Reviewed-by on v1 1/1
#3 lore raw
In reply to Bart Van Assche
Quoted 11 lines · Bart Van Assche

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.

Quoted 8 lines

Closes:
https://lore.kernel.org/linux-scsi/[email protected]/

Fixes b92e5937e352 ("scsi: ufs: core: Move code out of an if-

statement")

Appreciate it!

#4 lore raw
In reply to Bart Van Assche
Quoted 9 lines · Bart Van Assche

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-queue, thanks!

[1/1] scsi: ufs: core: Restore SM8650 support

      https://git.kernel.org/mkp/scsi/c/007cd6ba9aac
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering