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>] [thread-next>] [day] [month] [year] [list]
Date:   Fri,  5 Feb 2021 10:36:31 +0900
From:   DooHyun Hwang <dh0421.hwang@...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, stanley.chu@...iatek.com,
        cang@...eaurora.org, asutoshd@...eaurora.org, beanhuo@...ron.com,
        jaegeuk@...nel.org, adrian.hunter@...el.com, satyat@...gle.com
Cc:     grant.jung@...sung.com, jt77.jang@...sung.com,
        junwoo80.lee@...sung.com, jangsub.yi@...sung.com,
        sh043.lee@...sung.com, cw9316.lee@...sung.com,
        sh8267.baek@...sung.com, wkon.kim@...sung.com,
        DooHyun Hwang <dh0421.hwang@...sung.com>
Subject: [PATCH 1/3] scsi: ufs: retry link startup if that fails and device
 state is not active

Remove unnecessary link startup command if it was completed.

UniPro stack is reset and enabled when ufshc is enabled.
The link startup command is issued after enabling ufshc,
if link startup is completed, there is no needed to issue again.

Signed-off-by: DooHyun Hwang <dh0421.hwang@...sung.com>
---
 drivers/scsi/ufs/ufshcd.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 721f55db181f..286f7c918f0e 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -4642,13 +4642,13 @@ static int ufshcd_link_startup(struct ufs_hba *hba)
 		ufshcd_update_evt_hist(hba,
 				       UFS_EVT_LINK_STARTUP_FAIL,
 				       (u32)ret);
-		goto out;
-	}
 
-	if (link_startup_again) {
-		link_startup_again = false;
-		retries = DME_LINKSTARTUP_RETRIES;
-		goto link_startup;
+		if (link_startup_again) {
+			link_startup_again = false;
+			retries = DME_LINKSTARTUP_RETRIES;
+			goto link_startup;
+		}
+		goto out;
 	}
 
 	/* Mark that link is up in PWM-G1, 1-lane, SLOW-AUTO mode */
-- 
2.29.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ