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

Commit ae375995 authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "scsi: ufs: fix handling of bActiveICCLevel" into msm-4.8

parents 3d48301e 8a93dbde
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -6536,7 +6536,7 @@ static u32 ufshcd_find_max_sup_active_icc_level(struct ufs_hba *hba,
	return icc_level;
}

static void ufshcd_init_icc_levels(struct ufs_hba *hba)
static void ufshcd_set_active_icc_lvl(struct ufs_hba *hba)
{
	int ret;
	int buff_len = QUERY_DESC_POWER_MAX_SIZE;
@@ -6901,6 +6901,14 @@ static int ufshcd_probe_hba(struct ufs_hba *hba)
		}
	}

	/*
	 * bActiveICCLevel is volatile for UFS device (as per latest v2.1 spec)
	 * and for removable UFS card as well, hence always set the parameter.
	 * Note: Error handler may issue the device reset hence resetting
	 *       bActiveICCLevel as well so it is always safe to set this here.
	 */
	ufshcd_set_active_icc_lvl(hba);

	/* set the state as operational after switching to desired gear */
	hba->ufshcd_state = UFSHCD_STATE_OPERATIONAL;
	/*
@@ -6916,8 +6924,6 @@ static int ufshcd_probe_hba(struct ufs_hba *hba)
				QUERY_FLAG_IDN_PWR_ON_WPE, &flag))
			hba->dev_info.f_power_on_wp_en = flag;

		ufshcd_init_icc_levels(hba);

		/* Add required well known logical units to scsi mid layer */
		if (ufshcd_scsi_add_wlus(hba))
			goto out;