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: Sujeev Dias <sdias@codeaurora.org>
This commit is contained in:
parent
f2dfcc956e
commit
4f3f403a2e
1 changed files with 16 additions and 9 deletions
|
@ -6865,17 +6865,24 @@ static int msm_pcie_pm_resume(struct pci_dev *dev,
|
|||
dev->bus->number, dev->bus->primary);
|
||||
|
||||
if (!(options & MSM_PCIE_CONFIG_NO_CFG_RESTORE)) {
|
||||
PCIE_DBG(pcie_dev,
|
||||
"RC%d: entry of PCI framework restore state\n",
|
||||
pcie_dev->rc_idx);
|
||||
if (pcie_dev->saved_state) {
|
||||
PCIE_DBG(pcie_dev,
|
||||
"RC%d: entry of PCI framework restore state\n",
|
||||
pcie_dev->rc_idx);
|
||||
|
||||
pci_load_and_free_saved_state(dev,
|
||||
&pcie_dev->saved_state);
|
||||
pci_restore_state(dev);
|
||||
pci_load_and_free_saved_state(dev,
|
||||
&pcie_dev->saved_state);
|
||||
pci_restore_state(dev);
|
||||
|
||||
PCIE_DBG(pcie_dev,
|
||||
"RC%d: exit of PCI framework restore state\n",
|
||||
pcie_dev->rc_idx);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue