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

Commit 463b3f4a authored by Tony Truong's avatar Tony Truong
Browse files

msm: pcie: allow client to turn off link during linkdown



The client driver can recover the link during linkdown callback.
The change here allows the client to turn off the power of link
when the link status is down.

Change-Id: Ia036199c39c66a6a6e258318b878c9c966c11260
Signed-off-by: default avatarTony Truong <truong@codeaurora.org>
parent d81481d4
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -3048,10 +3048,15 @@ int msm_pcie_pm_control(enum msm_pcie_pm_opt pm_opt, u32 busnr, void *user,

	switch (pm_opt) {
	case MSM_PCIE_SUSPEND:
		if (msm_pcie_dev[rc_idx].link_status != MSM_PCIE_LINK_ENABLED) {
			PCIE_ERR(&msm_pcie_dev[rc_idx],
		if (msm_pcie_dev[rc_idx].link_status != MSM_PCIE_LINK_ENABLED)
			PCIE_DBG(&msm_pcie_dev[rc_idx],
				"PCIe: RC%d: requested to suspend when link is not enabled:%d.\n",
				rc_idx, msm_pcie_dev[rc_idx].link_status);

		if (!msm_pcie_dev[rc_idx].power_on) {
			PCIE_ERR(&msm_pcie_dev[rc_idx],
				"PCIe: RC%d: requested to suspend when link is powered down:%d.\n",
				rc_idx, msm_pcie_dev[rc_idx].link_status);
			break;
		}