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

Commit 4f3f403a authored by Sujeev Dias's avatar Sujeev Dias
Browse files

msm: pcie: always recover cfg space during resume



During linkdown pci host cannot save the config space
prior to suspending the link. If saved_state is null
recover rc config space using shadow recovery.

CRs-Fixed: 2141146
Change-Id: I6c6e817ae2c32d8040853fe22785040480aa76eb
Signed-off-by: default avatarSujeev Dias <sdias@codeaurora.org>
parent f2dfcc95
Loading
Loading
Loading
Loading
+16 −9
Original line number Diff line number Diff line
@@ -6865,6 +6865,7 @@ static int msm_pcie_pm_resume(struct pci_dev *dev,
			 dev->bus->number, dev->bus->primary);

		if (!(options & MSM_PCIE_CONFIG_NO_CFG_RESTORE)) {
			if (pcie_dev->saved_state) {
				PCIE_DBG(pcie_dev,
					 "RC%d: entry of PCI framework restore state\n",
					 pcie_dev->rc_idx);
@@ -6876,6 +6877,12 @@ static int msm_pcie_pm_resume(struct pci_dev *dev,
				PCIE_DBG(pcie_dev,
					 "RC%d: exit of PCI framework restore state\n",
					 pcie_dev->rc_idx);
			} else {
				PCIE_DBG(pcie_dev,
					 "RC%d: restore rc config space using shadow recovery\n",
					 pcie_dev->rc_idx);
				msm_pcie_cfg_recover(pcie_dev, true);
			}
		}
	}