From 99ffbda5dc6d9fdfc489bae44b9118c674e7b55e Mon Sep 17 00:00:00 2001 From: Yue Ma Date: Wed, 24 Jul 2019 17:25:48 -0700 Subject: [PATCH] qcacmn: Avoid disable/enable twice for runtime PM suspend/resume Commit 13835b1aa206 ("qcacmn: Do not access bus in suspend_noirq") adds enable/disable WAKE IRQ through hif_apps_irqs_enable/disable APIs to bus suspend/resume routine which are also called by runtime PM routine. However, runtime PM suspend/resume routine will also enable/disable WAKE IRQ by itself so WAKE IRQ will be disabled twice and only enabled once before entering suspend so the WAKE MSI will be masked which results device requested resume failure. It is also same for resume path. Hence remove enable/disable WAKE IRQ from runtime PM routine. Change-Id: I5774d0450c70f3ff74ea81dc44ef3656eb8c7a96 CRs-fixed: 2495897 --- hif/src/pcie/if_pci.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/hif/src/pcie/if_pci.c b/hif/src/pcie/if_pci.c index c8b9a2fbb308..63fbc3a97b24 100644 --- a/hif/src/pcie/if_pci.c +++ b/hif/src/pcie/if_pci.c @@ -2854,25 +2854,14 @@ int hif_runtime_suspend(struct hif_opaque_softc *hif_ctx) return errno; } - errno = hif_apps_irqs_disable(hif_ctx); - if (errno) { - HIF_ERROR("%s: failed disable irqs: %d", __func__, errno); - goto bus_resume; - } - errno = hif_bus_suspend_noirq(hif_ctx); if (errno) { HIF_ERROR("%s: failed bus suspend noirq: %d", __func__, errno); - goto irqs_enable; + goto bus_resume; } - /* link should always be down; skip enable wake irq */ - return 0; -irqs_enable: - QDF_BUG(!hif_apps_irqs_enable(hif_ctx)); - bus_resume: QDF_BUG(!hif_bus_resume(hif_ctx)); @@ -2918,10 +2907,7 @@ void hif_fastpath_resume(struct hif_opaque_softc *hif_ctx) */ int hif_runtime_resume(struct hif_opaque_softc *hif_ctx) { - /* link should always be down; skip disable wake irq */ - QDF_BUG(!hif_bus_resume_noirq(hif_ctx)); - QDF_BUG(!hif_apps_irqs_enable(hif_ctx)); QDF_BUG(!hif_bus_resume(hif_ctx)); return 0; }