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

Commit 101138f9 authored by Tony Truong's avatar Tony Truong
Browse files

msm: pcie: update with link power on check for user PCIe resume



Instead of checking PCIe S/W link state, check if the link is on
is on or off to determine whether PCIe resume should be allowed
or not. PCIe S/W link state is not enough to determine since
MSM_PCIE_LINK_DOWN state can be set for link on or off.

Change-Id: I23a27007eb90134c90d5a20034248697423ebeeb
Signed-off-by: default avatarTony Truong <truong@codeaurora.org>
parent dedc7a56
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -7298,12 +7298,10 @@ int msm_pcie_pm_control(enum msm_pcie_pm_opt pm_opt, u32 busnr, void *user,
			break;
		}

		if (msm_pcie_dev[rc_idx].link_status !=
					MSM_PCIE_LINK_DISABLED) {
		if (msm_pcie_dev[rc_idx].power_on) {
			PCIE_ERR(&msm_pcie_dev[rc_idx],
				"PCIe: RC%d: requested to resume when link is not disabled:%d. Number of active EP(s): %d\n",
				rc_idx, msm_pcie_dev[rc_idx].link_status,
				msm_pcie_dev[rc_idx].num_active_ep);
				"PCIe: RC%d: requested to resume when link is already powered on. Number of active EP(s): %d\n",
				rc_idx, msm_pcie_dev[rc_idx].num_active_ep);
			break;
		}