diff options
| -rw-r--r-- | CORE/SERVICES/HIF/PCIe/if_pci.c | 17 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 4 |
2 files changed, 8 insertions, 13 deletions
diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.c b/CORE/SERVICES/HIF/PCIe/if_pci.c index 086ee60325ba..17e99b14996a 100644 --- a/CORE/SERVICES/HIF/PCIe/if_pci.c +++ b/CORE/SERVICES/HIF/PCIe/if_pci.c @@ -2723,18 +2723,18 @@ __hif_pci_suspend(struct pci_dev *pdev, pm_message_t state, bool runtime_pm) } pr_debug("%s: Suspend completes (D0WOW)\n", __func__); + HIFCancelDeferredTargetSleep(sc->hif_device); ret = 0; goto out; } #endif - adf_os_spin_lock_irqsave(&hif_state->suspend_lock); - - /*Disable PCIe interrupts*/ - if (HIFTargetSleepStateAdjust(targid, FALSE, TRUE) < 0) { - adf_os_spin_unlock_irqrestore(&hif_state->suspend_lock); + /* Wakeup ROME to disable PCIe interrupts */ + if (HIFTargetSleepStateAdjust(targid, FALSE, TRUE) < 0) goto out; - } + + /* Acquire lock to access shared register */ + adf_os_spin_lock_irqsave(&hif_state->suspend_lock); A_PCI_WRITE32(sc->mem+(SOC_CORE_BASE_ADDRESS | PCIE_INTR_ENABLE_ADDRESS), 0); A_PCI_WRITE32(sc->mem+(SOC_CORE_BASE_ADDRESS | PCIE_INTR_CLR_ADDRESS), PCIE_INTR_FIRMWARE_MASK | PCIE_INTR_CE_MASK_ALL); @@ -2747,17 +2747,16 @@ __hif_pci_suspend(struct pci_dev *pdev, pm_message_t state, bool runtime_pm) hif_irq_record(HIF_SUSPEND_END, sc); + /* Put ROME to sleep */ if (HIFTargetSleepStateAdjust(targid, TRUE, FALSE) < 0) { adf_os_spin_unlock_irqrestore(&hif_state->suspend_lock); goto out; } - /* Stop the HIF Sleep Timer */ HIFCancelDeferredTargetSleep(sc->hif_device); adf_os_atomic_set(&sc->pci_link_suspended, 1); - - adf_os_spin_unlock_irqrestore( &hif_state->suspend_lock); + adf_os_spin_unlock_irqrestore(&hif_state->suspend_lock); /* Keep PCIe bus driver's shadow memory intact */ vos_pcie_shadow_control(pdev, FALSE); diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index bc2be814822f..c66ddff4cc1e 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -22377,8 +22377,6 @@ int wma_enable_wow_in_fw(WMA_HANDLE handle, int runtime_pm) return VOS_STATUS_E_FAULT; } - HTCCancelDeferredTargetSleep(scn); - wma->wow.wow_enable_cmd_sent = TRUE; return VOS_STATUS_SUCCESS; @@ -34879,8 +34877,6 @@ int wma_suspend_target(WMA_HANDLE handle, int disable_target_intr) return -1; } - HTCCancelDeferredTargetSleep(scn); - return 0; } |
