msm_11ad: Fix config space restore from suspend
Config space was not properly restored when resuming from suspend. Change-Id: I6b9188f3989957eb44c93302d7958d422bb29e81 Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org>
This commit is contained in:
parent
ab30d8cc16
commit
857bd53c2d
1 changed files with 11 additions and 3 deletions
|
@ -30,6 +30,9 @@
|
|||
#define SMMU_SIZE 0x40000000 /* Device address range size */
|
||||
|
||||
#define WIGIG_ENABLE_DELAY 50
|
||||
#define PM_OPT_SUSPEND (MSM_PCIE_CONFIG_NO_CFG_RESTORE | \
|
||||
MSM_PCIE_CONFIG_LINKDOWN)
|
||||
#define PM_OPT_RESUME MSM_PCIE_CONFIG_NO_CFG_RESTORE
|
||||
|
||||
struct device;
|
||||
|
||||
|
@ -85,7 +88,7 @@ static int ops_suspend(void *handle)
|
|||
return rc;
|
||||
}
|
||||
rc = msm_pcie_pm_control(MSM_PCIE_SUSPEND, pcidev->bus->number,
|
||||
pcidev, NULL, 0);
|
||||
pcidev, NULL, PM_OPT_SUSPEND);
|
||||
if (rc) {
|
||||
dev_err(ctx->dev, "msm_pcie_pm_control(SUSPEND) failed :%d\n",
|
||||
rc);
|
||||
|
@ -112,13 +115,18 @@ static int ops_resume(void *handle)
|
|||
msleep(WIGIG_ENABLE_DELAY);
|
||||
|
||||
rc = msm_pcie_pm_control(MSM_PCIE_RESUME, pcidev->bus->number,
|
||||
pcidev, NULL, 0);
|
||||
pcidev, NULL, PM_OPT_RESUME);
|
||||
if (rc) {
|
||||
dev_err(ctx->dev, "msm_pcie_pm_control(RESUME) failed :%d\n",
|
||||
rc);
|
||||
return rc;
|
||||
}
|
||||
pci_restore_state(pcidev);
|
||||
rc = msm_pcie_recover_config(pcidev);
|
||||
if (rc) {
|
||||
dev_err(ctx->dev, "msm_pcie_recover_config failed :%d\n",
|
||||
rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue