From f26fa0e5a43801f9e69e3c2c0c5cbda383a7712b Mon Sep 17 00:00:00 2001 From: Kai Liu Date: Thu, 14 Mar 2019 21:08:43 +0800 Subject: [PATCH] qcacmn: cancel target sleep timer in hif suspend callback According to PCIe controller suspend logic, RC will disable its regulator and clock in suspend phase that means in noirq suspend phase, client EP should not access PCIe bus anymore. Target sleep timer will access soc register, so wlan driver needs guarantee this timer is stopped after RC shutdown its power and clock. CRs-Fixed: 2376675 Change-Id: If76abab1fd4d8d6f36beb13d1b62a7e0a0e7aa4f --- hif/src/pcie/if_pci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hif/src/pcie/if_pci.c b/hif/src/pcie/if_pci.c index e23d8e111b2f..323935c5a337 100644 --- a/hif/src/pcie/if_pci.c +++ b/hif/src/pcie/if_pci.c @@ -2532,6 +2532,8 @@ void hif_pci_prevent_linkdown(struct hif_softc *scn, bool flag) */ int hif_pci_bus_suspend(struct hif_softc *scn) { + /* Stop the HIF Sleep Timer */ + hif_cancel_deferred_target_sleep(scn); return 0; } @@ -2598,9 +2600,6 @@ int hif_pci_bus_suspend_noirq(struct hif_softc *scn) if (hif_drain_tasklets(scn) != 0) return -EBUSY; - /* Stop the HIF Sleep Timer */ - hif_cancel_deferred_target_sleep(scn); - if (hif_can_suspend_link(GET_HIF_OPAQUE_HDL(scn))) qdf_atomic_set(&scn->link_suspended, 1);