public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: ufs: core: Restore SM8650 support
@ 2024-11-06 18:10 Bart Van Assche
  2024-11-07  2:12 ` Martin K. Petersen
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Bart Van Assche @ 2024-11-06 18:10 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: linux-scsi, Bart Van Assche, Neil Armstrong,
	Manivannan Sadhasivam, James E.J. Bottomley, Bao D. Nguyen

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(-)

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;
 }
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: ufs: core: Restore SM8650 support
  2024-11-06 18:10 [PATCH] scsi: ufs: core: Restore SM8650 support Bart Van Assche
@ 2024-11-07  2:12 ` Martin K. Petersen
  2024-11-07 10:50 ` Manivannan Sadhasivam
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2024-11-07  2:12 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: Martin K . Petersen, linux-scsi, Neil Armstrong,
	Manivannan Sadhasivam, James E.J. Bottomley, Bao D. Nguyen


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!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: ufs: core: Restore SM8650 support
  2024-11-06 18:10 [PATCH] scsi: ufs: core: Restore SM8650 support Bart Van Assche
  2024-11-07  2:12 ` Martin K. Petersen
@ 2024-11-07 10:50 ` Manivannan Sadhasivam
  2024-11-08 10:13 ` Bean Huo
  2024-11-14  2:49 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Manivannan Sadhasivam @ 2024-11-07 10:50 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: Martin K . Petersen, linux-scsi, Neil Armstrong,
	James E.J. Bottomley, Bao D. Nguyen

On Wed, Nov 06, 2024 at 10:10:11AM -0800, Bart Van Assche wrote:
> 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>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

- Mani

> ---
>  drivers/ufs/host/ufs-qcom.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> 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;
>  }
>  

-- 
மணிவண்ணன் சதாசிவம்

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: ufs: core: Restore SM8650 support
  2024-11-06 18:10 [PATCH] scsi: ufs: core: Restore SM8650 support Bart Van Assche
  2024-11-07  2:12 ` Martin K. Petersen
  2024-11-07 10:50 ` Manivannan Sadhasivam
@ 2024-11-08 10:13 ` Bean Huo
  2024-11-14  2:49 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Bean Huo @ 2024-11-08 10:13 UTC (permalink / raw)
  To: Bart Van Assche, Martin K . Petersen
  Cc: linux-scsi, Neil Armstrong, Manivannan Sadhasivam,
	James E.J. Bottomley, Bao D. Nguyen

On Wed, 2024-11-06 at 10:10 -0800, Bart Van Assche wrote:
> 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>

Appreciate it!


Reviewed-by: Bean Huo <beanhuo@micron.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: ufs: core: Restore SM8650 support
  2024-11-06 18:10 [PATCH] scsi: ufs: core: Restore SM8650 support Bart Van Assche
                   ` (2 preceding siblings ...)
  2024-11-08 10:13 ` Bean Huo
@ 2024-11-14  2:49 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2024-11-14  2:49 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: Martin K . Petersen, linux-scsi, Neil Armstrong,
	Manivannan Sadhasivam, James E.J. Bottomley, Bao D. Nguyen

On Wed, 06 Nov 2024 10:10:11 -0800, Bart Van Assche wrote:

> 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

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-11-14  2:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-06 18:10 [PATCH] scsi: ufs: core: Restore SM8650 support Bart Van Assche
2024-11-07  2:12 ` Martin K. Petersen
2024-11-07 10:50 ` Manivannan Sadhasivam
2024-11-08 10:13 ` Bean Huo
2024-11-14  2:49 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox