lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220518205201.58264-1-hy50.seo@samsung.com>
Date:   Thu, 19 May 2022 05:52:01 +0900
From:   SEO HOYOUNG <hy50.seo@...sung.com>
To:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        alim.akhtar@...sung.com, avri.altman@....com, jejb@...ux.ibm.com,
        martin.petersen@...cle.com, beanhuo@...ron.com,
        asutoshd@...eaurora.org, cang@...eaurora.org, bvanassche@....org,
        bhoon95.kim@...sung.com, kwmad.kim@...sung.com
Cc:     SEO HOYOUNG <hy50.seo@...sung.com>
Subject: [PATCH v1] scsi: ufs: Change the shutting_down flag setting
 position

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@...sung.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ