Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50657f0a authored by Sayali Lokhande's avatar Sayali Lokhande
Browse files

scsi: ufs: Avoid re-sending UFS link startup command



As part of UFS initialization and resume, we are already
resetting host and UFS device (RESET_N) before we issue
link startup command. So we need not explicitly re-send
the link startup again and avoid logging this expected
error we get in 2nd link startup attempt (DME.LINKLOST.ind).
This change removes logic to send link startup again while
link is already up.

Change-Id: I3d62b3f9e16cf88aaba39f33998e115e69daa136
Signed-off-by: default avatarSayali Lokhande <sayalil@codeaurora.org>
parent ce01c38c
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -5774,16 +5774,7 @@ static int ufshcd_link_startup(struct ufs_hba *hba)
{
	int ret;
	int retries = DME_LINKSTARTUP_RETRIES;
	bool link_startup_again = false;

	/*
	 * If UFS device isn't active then we will have to issue link startup
	 * 2 times to make sure the device state move to active.
	 */
	if (!ufshcd_is_ufs_dev_active(hba))
		link_startup_again = true;

link_startup:
	do {
		ufshcd_vops_link_startup_notify(hba, PRE_CHANGE);

@@ -5812,12 +5803,6 @@ static int ufshcd_link_startup(struct ufs_hba *hba)
		/* failed to get the link up... retire */
		goto out;

	if (link_startup_again) {
		link_startup_again = false;
		retries = DME_LINKSTARTUP_RETRIES;
		goto link_startup;
	}

	/* Mark that link is up in PWM-G1, 1-lane, SLOW-AUTO mode */
	ufshcd_init_pwr_info(hba);
	ufshcd_print_pwr_info(hba);