summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYue Ma <yuem@codeaurora.org>2015-12-10 19:08:18 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:15:55 -0700
commitb7df8c422ec511f3a92f27dc9da5ea2f29f2d20f (patch)
tree1a5740329a23580b6aea3ce1500f4d09647f87cf
parentf6c9eb51395ec58e9672f2edb0f0c5cf904f6c77 (diff)
cnss: Recover PCIe configuration space during normal WLAN recovery
During normal SSR there is a corner case that somehow WLAN driver fails to read PCIe configuration space which can result corruption when it tries to save it. Hence recover PCIe configuration space from shadow registers as well in normal SSR. This is same as the recovery for real PCIe link down. Change-Id: I2bae0f2e322829a9689d3a129145b54c079dccdf CRs-fixed: 886245 Signed-off-by: Yue Ma <yuem@codeaurora.org>
-rw-r--r--drivers/net/wireless/cnss/cnss_pci.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/drivers/net/wireless/cnss/cnss_pci.c b/drivers/net/wireless/cnss/cnss_pci.c
index 97a34feac05e..08e8f02a2a4f 100644
--- a/drivers/net/wireless/cnss/cnss_pci.c
+++ b/drivers/net/wireless/cnss/cnss_pci.c
@@ -2281,17 +2281,7 @@ static int cnss_shutdown(const struct subsys_desc *subsys, bool force_stop)
if (wdrv && wdrv->shutdown)
wdrv->shutdown(pdev);
- if (penv->pcie_link_state && !penv->pcie_link_down_ind) {
- pci_save_state(pdev);
- penv->saved_state = pci_store_saved_state(pdev);
- if (msm_pcie_pm_control(MSM_PCIE_SUSPEND,
- cnss_get_pci_dev_bus_number(pdev),
- pdev, NULL, PM_OPTIONS)) {
- pr_debug("cnss: Failed to shutdown PCIe link!\n");
- ret = -EFAULT;
- }
- penv->pcie_link_state = PCIE_LINK_DOWN;
- } else if (penv->pcie_link_state && penv->pcie_link_down_ind) {
+ if (penv->pcie_link_state) {
if (msm_pcie_pm_control(MSM_PCIE_SUSPEND,
cnss_get_pci_dev_bus_number(pdev),
pdev, NULL, PM_OPTIONS_SUSPEND_LINK_DOWN)) {
@@ -2345,18 +2335,7 @@ static int cnss_powerup(const struct subsys_desc *subsys)
goto err_pcie_link_up;
}
- if (!penv->pcie_link_state && !penv->pcie_link_down_ind) {
- ret = msm_pcie_pm_control(MSM_PCIE_RESUME,
- cnss_get_pci_dev_bus_number(pdev),
- pdev, NULL, PM_OPTIONS);
-
- if (ret) {
- pr_err("cnss: Failed to bring-up PCIe link!\n");
- goto err_pcie_link_up;
- }
- penv->pcie_link_state = PCIE_LINK_UP;
-
- } else if (!penv->pcie_link_state && penv->pcie_link_down_ind) {
+ if (!penv->pcie_link_state) {
ret = msm_pcie_pm_control(MSM_PCIE_RESUME,
cnss_get_pci_dev_bus_number(pdev),
pdev, NULL, PM_OPTIONS_RESUME_LINK_DOWN);