From 5322da191dad11267c82f0e5fc8cfa594670d8ef Mon Sep 17 00:00:00 2001 From: Jinwei Chen Date: Mon, 21 Dec 2020 05:21:14 -0800 Subject: [PATCH] qcacmn: support FSE cache flushing suspend/resume scenario: FISA new FST entry is initialed, host will start one timer to send HTT MSG DP_HTT_FST_CACHE_INVALIDATE_FULL to FW in 5 ms, WOW suspending happened in the same time, PCIe bus get suspended. 5 ms later, HTT msg sending will try to prevent PCIe L1 to update CE SRNG HP register, hit assert as PCIe bus suspended already. suspend and cancel the FSE cache flushing timer when dp_bus_suspend, resume it when dp_bus_resume. CRs-Fixed: 2843214 Change-Id: Ie2bc115a0de068335d6c46749f52d205cc21f5a3 --- dp/wifi3.0/dp_main.c | 12 ++++++++++++ dp/wifi3.0/dp_types.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 8768922eadaf..9aa929dcbd93 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -5219,6 +5219,14 @@ static QDF_STATUS dp_rx_dump_fisa_stats(struct dp_soc *soc) static void dp_rx_dump_fisa_table(struct dp_soc *soc) { } + +static void dp_suspend_fse_cache_flush(struct dp_soc *soc) +{ +} + +static void dp_resume_fse_cache_flush(struct dp_soc *soc) +{ +} #endif /* !WLAN_SUPPORT_RX_FISA */ #ifndef WLAN_DP_FEATURE_SW_LATENCY_MGR @@ -11700,6 +11708,8 @@ static QDF_STATUS dp_bus_suspend(struct cdp_soc_t *soc_hdl, uint8_t pdev_id) dp_service_mon_rings(soc, DP_MON_REAP_BUDGET); } + dp_suspend_fse_cache_flush(soc); + return QDF_STATUS_SUCCESS; } @@ -11723,6 +11733,8 @@ static QDF_STATUS dp_bus_resume(struct cdp_soc_t *soc_hdl, uint8_t pdev_id) qdf_timer_mod(&soc->mon_reap_timer, DP_INTR_POLL_TIMER_MS); + dp_resume_fse_cache_flush(soc); + return QDF_STATUS_SUCCESS; } diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h index 9c3b59e1ae93..7152ffb575a8 100644 --- a/dp/wifi3.0/dp_types.h +++ b/dp/wifi3.0/dp_types.h @@ -2979,6 +2979,8 @@ struct dp_rx_fst { struct dp_soc *soc_hdl; qdf_atomic_t fse_cache_flush_posted; qdf_timer_t fse_cache_flush_timer; + /* Allow FSE cache flush cmd to FW */ + bool fse_cache_flush_allow; struct fse_cache_flush_history cache_fl_rec[MAX_FSE_CACHE_FL_HST]; /* FISA DP stats */ struct dp_fisa_stats stats;