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

Commit d17e9642 authored by Venkat Gopalakrishnan's avatar Venkat Gopalakrishnan
Browse files

Revert "scsi: ufs: disable ah8 during suspend and enable it on resume"



This reverts commit 33ee9fb7 ("scsi: ufs: disable ah8 during
suspend and enable it on resume"). There is a race condition
between disabling AH8 and HW initiated AH8 enter/exit causing
DME errors on next command transfer. Revert this change until
the issue is fixed.

Change-Id: Iece1266b345a09cae3f8de6b4780340515c19c4a
Signed-off-by: default avatarVenkat Gopalakrishnan <venkatg@codeaurora.org>
parent 9febdfdd
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -8220,13 +8220,6 @@ static int ufshcd_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
	hba->clk_gating.is_suspended = true;
	hba->hibern8_on_idle.is_suspended = true;

	/*
	 * Disable auto hibern8 to prevent unnecessary hibern8 enter/exit
	 * during suspend path
	 */
	if (ufshcd_is_auto_hibern8_supported(hba))
		ufshcd_set_auto_hibern8_timer(hba, 0);

	if (hba->clk_scaling.is_allowed) {
		cancel_work_sync(&hba->clk_scaling.suspend_work);
		cancel_work_sync(&hba->clk_scaling.resume_work);
@@ -8334,10 +8327,6 @@ enable_gating:
		ufshcd_resume_clkscaling(hba);
	hba->hibern8_on_idle.is_suspended = false;
	hba->clk_gating.is_suspended = false;
	/* Re-enable auto hibern8 in case of suspend failure */
	if (ufshcd_is_auto_hibern8_supported(hba))
		ufshcd_set_auto_hibern8_timer(hba,
						hba->hibern8_on_idle.delay_ms);
	ufshcd_release_all(hba);
out:
	hba->pm_op_in_progress = 0;
@@ -8431,13 +8420,6 @@ static int ufshcd_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)
	if (hba->clk_scaling.is_allowed)
		ufshcd_resume_clkscaling(hba);

	/*
	 * Enable auto hibern8 after successful resume to prevent
	 * unnecessary hibern8 enter/exit during resume path
	 */
	if (ufshcd_is_auto_hibern8_supported(hba))
		ufshcd_set_auto_hibern8_timer(hba,
						hba->hibern8_on_idle.delay_ms);
	/* Schedule clock gating in case of no access to UFS device yet */
	ufshcd_release_all(hba);
	goto out;