linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] scsi: ufs: unipro: add to define HS-Gear5 mode
       [not found] ` <CGME20220325053615epcas2p25b140872340b4711d4fef4c5a4cb45f4@epcas2p2.samsung.com>
@ 2022-03-24 17:21   ` SEO HOYOUNG
  2022-03-25  7:15     ` Alim Akhtar
  0 siblings, 1 reply; 5+ messages in thread
From: SEO HOYOUNG @ 2022-03-24 17:21 UTC (permalink / raw)
  To: linux-scsi, linux-kernel, alim.akhtar, avri.altman, jejb,
	martin.petersen, beanhuo, asutoshd, cang, bvanassche,
	bhoon95.kim, kwmad.kim
  Cc: SEO HOYOUNG

UFS devices support HS-Gear5 mode with UFS4.0 spec.
However there is no definition of HS-Gear5.
So added it in unipro header

Change-Id: Id5475005000fe66b432ab76fa3364a8c12296f7c
Signed-off-by: SEO HOYOUNG <hy50.seo@samsung.com>
---
 drivers/scsi/ufs/unipro.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/ufs/unipro.h b/drivers/scsi/ufs/unipro.h
index 8e9e486a4f7b..0d2131e1f027 100644
--- a/drivers/scsi/ufs/unipro.h
+++ b/drivers/scsi/ufs/unipro.h
@@ -231,6 +231,7 @@ enum ufs_hs_gear_tag {
 	UFS_HS_G2,		/* HS Gear 2 */
 	UFS_HS_G3,		/* HS Gear 3 */
 	UFS_HS_G4,		/* HS Gear 4 */
+	UFS_HS_G5,		/* HS Gear 5 */
 };
 
 enum ufs_unipro_ver {
-- 
2.26.0


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

* [PATCH v2] scsi: ufs: unipro: add to define HS-Gear5 mode
       [not found] ` <CGME20220325082858epcas2p41c0918b1cacce09eaa5f7ffe84d9f994@epcas2p4.samsung.com>
@ 2022-03-24 20:14   ` SEO HOYOUNG
  2022-03-25 15:34     ` Bart Van Assche
  0 siblings, 1 reply; 5+ messages in thread
From: SEO HOYOUNG @ 2022-03-24 20:14 UTC (permalink / raw)
  To: linux-scsi, linux-kernel, alim.akhtar, avri.altman, jejb,
	martin.petersen, beanhuo, asutoshd, cang, bvanassche,
	bhoon95.kim, kwmad.kim
  Cc: SEO HOYOUNG

UFS devices support HS-Gear5 mode with UFS4.0 spec.
However there is no definition of HS-Gear5.
So added it in unipro header

- there is no another mainline need to changed for
support GEAR5 with UFS4.0 spec.
It just need to check if the device supports HS-gear5.
And send to PMC command to changed HS-gear5.
It is a definition to check if the device supports
- delete change-id

Signed-off-by: SEO HOYOUNG <hy50.seo@samsung.com>
---
 drivers/scsi/ufs/unipro.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/ufs/unipro.h b/drivers/scsi/ufs/unipro.h
index 8e9e486a4f7b..0d2131e1f027 100644
--- a/drivers/scsi/ufs/unipro.h
+++ b/drivers/scsi/ufs/unipro.h
@@ -231,6 +231,7 @@ enum ufs_hs_gear_tag {
 	UFS_HS_G2,		/* HS Gear 2 */
 	UFS_HS_G3,		/* HS Gear 3 */
 	UFS_HS_G4,		/* HS Gear 4 */
+	UFS_HS_G5,		/* HS Gear 5 */
 };
 
 enum ufs_unipro_ver {
-- 
2.26.0


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

* RE: [PATCH v1] scsi: ufs: unipro: add to define HS-Gear5 mode
  2022-03-24 17:21   ` [PATCH v1] scsi: ufs: unipro: add to define HS-Gear5 mode SEO HOYOUNG
@ 2022-03-25  7:15     ` Alim Akhtar
  0 siblings, 0 replies; 5+ messages in thread
From: Alim Akhtar @ 2022-03-25  7:15 UTC (permalink / raw)
  To: 'SEO HOYOUNG',
	linux-scsi, linux-kernel, avri.altman, jejb, martin.petersen,
	beanhuo, asutoshd, cang, bvanassche, bhoon95.kim, kwmad.kim



>-----Original Message-----
>From: SEO HOYOUNG [mailto:hy50.seo@samsung.com]
>Sent: Thursday, March 24, 2022 10:51 PM
>To: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org;
>alim.akhtar@samsung.com; avri.altman@wdc.com; jejb@linux.ibm.com;
>martin.petersen@oracle.com; beanhuo@micron.com;
>asutoshd@codeaurora.org; cang@codeaurora.org; bvanassche@acm.org;
>bhoon95.kim@samsung.com; kwmad.kim@samsung.com
>Cc: SEO HOYOUNG <hy50.seo@samsung.com>
>Subject: [PATCH v1] scsi: ufs: unipro: add to define HS-Gear5 mode
>
>UFS devices support HS-Gear5 mode with UFS4.0 spec.
>However there is no definition of HS-Gear5.
>So added it in unipro header
>
>Change-Id: Id5475005000fe66b432ab76fa3364a8c12296f7c


Change-id should not be part of this, please run checkpatch to catch such things

>Signed-off-by: SEO HOYOUNG <hy50.seo@samsung.com>
>---
> drivers/scsi/ufs/unipro.h | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/drivers/scsi/ufs/unipro.h b/drivers/scsi/ufs/unipro.h index
>8e9e486a4f7b..0d2131e1f027 100644
>--- a/drivers/scsi/ufs/unipro.h
>+++ b/drivers/scsi/ufs/unipro.h
>@@ -231,6 +231,7 @@ enum ufs_hs_gear_tag {
> 	UFS_HS_G2,		/* HS Gear 2 */
> 	UFS_HS_G3,		/* HS Gear 3 */
> 	UFS_HS_G4,		/* HS Gear 4 */
>+	UFS_HS_G5,		/* HS Gear 5 */

I don’t have access to UFS4.0 spec yet, so not sure if this is the only change required for UFS4.0
Without having added support for UFS4.0, just updating HS gear does not make much sense

> };

>
> enum ufs_unipro_ver {
>--
>2.26.0




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

* Re: [PATCH v2] scsi: ufs: unipro: add to define HS-Gear5 mode
  2022-03-24 20:14   ` [PATCH v2] " SEO HOYOUNG
@ 2022-03-25 15:34     ` Bart Van Assche
  0 siblings, 0 replies; 5+ messages in thread
From: Bart Van Assche @ 2022-03-25 15:34 UTC (permalink / raw)
  To: SEO HOYOUNG, linux-scsi, linux-kernel, alim.akhtar, avri.altman,
	jejb, martin.petersen, beanhuo, asutoshd, cang, bhoon95.kim,
	kwmad.kim

On 3/24/22 13:14, SEO HOYOUNG wrote:
> diff --git a/drivers/scsi/ufs/unipro.h b/drivers/scsi/ufs/unipro.h
> index 8e9e486a4f7b..0d2131e1f027 100644
> --- a/drivers/scsi/ufs/unipro.h
> +++ b/drivers/scsi/ufs/unipro.h
> @@ -231,6 +231,7 @@ enum ufs_hs_gear_tag {
>   	UFS_HS_G2,		/* HS Gear 2 */
>   	UFS_HS_G3,		/* HS Gear 3 */
>   	UFS_HS_G4,		/* HS Gear 4 */
> +	UFS_HS_G5,		/* HS Gear 5 */
>   };

Where is the code that uses this new constant?

Thanks,

Bart.

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

* [PATCH v1] scsi: ufs: Change the shutting_down flag setting position
       [not found] ` <CGME20220519091007epcas2p2ba7cd404e9948ec4160f48cd83a995fa@epcas2p2.samsung.com>
@ 2022-05-18 20:52   ` SEO HOYOUNG
  0 siblings, 0 replies; 5+ messages in thread
From: SEO HOYOUNG @ 2022-05-18 20:52 UTC (permalink / raw)
  To: linux-scsi, linux-kernel, alim.akhtar, avri.altman, jejb,
	martin.petersen, beanhuo, asutoshd, cang, bvanassche,
	bhoon95.kim, kwmad.kim
  Cc: SEO HOYOUNG

When System shutdown, will called ufshcd_wl_shutdown().
Then the shutting_down falg set to 1 at ufshcd_wl_shutdown().
And send to SSU cmd at ufshcd_wl_shutdown()->__ufshcd_wl_suspend()->
ufshcd_set_dev_pwr_mode() function.

If occurred fail during send SSU cmd,
then will called ufshcd_err_handler for recovery.
But already set shutting_down to 1, so ufs driver could not recovery.
Then System wait for SSU cmd to be completed and
eventaully it will take Hang.
So changed the position where shutting_down is set.

Signed-off-by: SEO HOYOUNG <hy50.seo@samsung.com>
---
 drivers/scsi/ufs/ufshcd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 1fb3a8b9b03e..65d47cd5afbe 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -9235,10 +9235,6 @@ static void ufshcd_wl_shutdown(struct device *dev)
 
 	hba = shost_priv(sdev->host);
 
-	down(&hba->host_sem);
-	hba->shutting_down = true;
-	up(&hba->host_sem);
-
 	/* Turn on everything while shutting down */
 	ufshcd_rpm_get_sync(hba);
 	scsi_device_quiesce(sdev);
@@ -9248,6 +9244,10 @@ static void ufshcd_wl_shutdown(struct device *dev)
 		scsi_device_quiesce(sdev);
 	}
 	__ufshcd_wl_suspend(hba, UFS_SHUTDOWN_PM);
+
+	down(&hba->host_sem);
+	hba->shutting_down = true;
+	up(&hba->host_sem);
 }
 
 /**
-- 
2.26.0


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

end of thread, other threads:[~2022-05-19  9:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <sc.suh@samsung.com;>
     [not found] ` <CGME20220325053615epcas2p25b140872340b4711d4fef4c5a4cb45f4@epcas2p2.samsung.com>
2022-03-24 17:21   ` [PATCH v1] scsi: ufs: unipro: add to define HS-Gear5 mode SEO HOYOUNG
2022-03-25  7:15     ` Alim Akhtar
     [not found] ` <CGME20220325082858epcas2p41c0918b1cacce09eaa5f7ffe84d9f994@epcas2p4.samsung.com>
2022-03-24 20:14   ` [PATCH v2] " SEO HOYOUNG
2022-03-25 15:34     ` Bart Van Assche
     [not found] ` <CGME20220519091007epcas2p2ba7cd404e9948ec4160f48cd83a995fa@epcas2p2.samsung.com>
2022-05-18 20:52   ` [PATCH v1] scsi: ufs: Change the shutting_down flag setting position SEO HOYOUNG

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).