From d3f447ad13b544492e5b351fd06bc3e9f93a75db Mon Sep 17 00:00:00 2001 From: Alan Chen Date: Tue, 8 Dec 2020 10:40:01 -0800 Subject: [PATCH] qcacmn: Clear PCIe link suspended state RTPM wow resume gets triggered from ongoing WMI cmds related to SAP getting started on the 5 GHz DFS channel. Even though PCIe link resume is successful, there is a link up vote from UMAC and scn link suspended state is not getting clear. Thus, clear the scn->link_suspended state at the end of hif_pci_bus_resume_noirq() because before HIF PCIe bus resume noirq phase is complete, PCIe link is already resumed. Change-Id: If05593c95d2d63d271fed4abcf84b43e96cc070e CRs-Fixed: 2833831 --- hif/src/pcie/if_pci.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hif/src/pcie/if_pci.c b/hif/src/pcie/if_pci.c index 4ff792efd867..2ed8779405a8 100644 --- a/hif/src/pcie/if_pci.c +++ b/hif/src/pcie/if_pci.c @@ -2418,8 +2418,12 @@ int hif_pci_bus_resume_noirq(struct hif_softc *scn) { hif_apps_wake_irq_disable(GET_HIF_OPAQUE_HDL(scn)); - if (hif_can_suspend_link(GET_HIF_OPAQUE_HDL(scn))) - qdf_atomic_set(&scn->link_suspended, 0); + /* a vote for link up can come in the middle of the ongoing resume + * process. hence, clear the link suspend flag once + * hif_bus_resume_noirq() succeeds since PCIe link is already resumed + * by this time + */ + qdf_atomic_set(&scn->link_suspended, 0); return 0; }