[PATCH 1/3] scsi: ufs: retry link startup if that fails and device state is not active

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux