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

Commit 9b534ef7 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: pcie: add lock for user issued suspend"

parents 171d14fd 102733c2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1910,6 +1910,8 @@ int msm_pcie_pm_control(enum msm_pcie_pm_opt pm_opt, u32 busnr, void *user,
		}
		if (!(options & MSM_PCIE_CONFIG_LINKDOWN))
			msm_pcie_dev[rc_idx].user_suspend = true;

		mutex_lock(&msm_pcie_dev[rc_idx].recovery_lock);
		ret = msm_pcie_pm_suspend(dev, user, data, options);
		if (ret) {
			pr_err(
@@ -1917,6 +1919,7 @@ int msm_pcie_pm_control(enum msm_pcie_pm_opt pm_opt, u32 busnr, void *user,
				rc_idx);
			msm_pcie_dev[rc_idx].user_suspend = false;
		}
		mutex_unlock(&msm_pcie_dev[rc_idx].recovery_lock);
		break;
	case MSM_PCIE_RESUME:
		PCIE_DBG("User of RC%d requests to resume the link\n", rc_idx);