From 28bf308018bc559fdb8d0552602ee634d8446b03 Mon Sep 17 00:00:00 2001 From: Manikanta Pubbisetty Date: Tue, 22 Dec 2020 17:48:58 +0530 Subject: [PATCH] qcacmn: avoid FSE cache flush messages during runtime suspend When runtime power management is enabled, until the system is fully resumed, we do not post any message to CE, instead they will be queued in HTC. Once the device is fully resumed, all HTT messages in the queues will be downloaded to CE at once. In some corner cases, it is found that too many FSE caches flush messages getting queued during the runtime resume; once the device is fully resumed, all these would be downloaded to the FW/HW at once causing unintended crashes. Avoid posting FSE cache flush messages until the device is fully resumed to fix the issue. Change-Id: I2be21406e8c7a9dcd86df3e93c2568797defcad0 CRs-Fixed: 2843541 --- dp/wifi3.0/dp_internal.h | 10 +++++++++- dp/wifi3.0/dp_main.c | 3 +++ dp/wifi3.0/dp_types.h | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/dp/wifi3.0/dp_internal.h b/dp/wifi3.0/dp_internal.h index db55c47b8d30..8c8aa67e5210 100644 --- a/dp/wifi3.0/dp_internal.h +++ b/dp/wifi3.0/dp_internal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -2328,12 +2328,20 @@ void dp_rx_dump_fisa_table(struct dp_soc *soc); */ void dp_rx_fst_update_cmem_params(struct dp_soc *soc, uint16_t num_entries, uint32_t cmem_ba_lo, uint32_t cmem_ba_hi); + +void +dp_rx_fst_update_pm_suspend_status(struct dp_soc *soc, bool suspended); #else static inline void dp_rx_fst_update_cmem_params(struct dp_soc *soc, uint16_t num_entries, uint32_t cmem_ba_lo, uint32_t cmem_ba_hi) { } + +static inline void +dp_rx_fst_update_pm_suspend_status(struct dp_soc *soc, bool suspended) +{ +} #endif /* WLAN_SUPPORT_RX_FISA */ #ifdef MAX_ALLOC_PAGE_SIZE diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index ea1e09d1c0a0..3f26070111fe 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -11269,6 +11269,8 @@ static QDF_STATUS dp_runtime_suspend(struct cdp_soc_t *soc_hdl, uint8_t pdev_id) if (soc->intr_mode == DP_INTR_POLL) qdf_timer_stop(&soc->int_timer); + dp_rx_fst_update_pm_suspend_status(soc, true); + return QDF_STATUS_SUCCESS; } @@ -11316,6 +11318,7 @@ static QDF_STATUS dp_runtime_resume(struct cdp_soc_t *soc_hdl, uint8_t pdev_id) } dp_flush_ring_hptp(soc, soc->reo_cmd_ring.hal_srng); + dp_rx_fst_update_pm_suspend_status(soc, false); return QDF_STATUS_SUCCESS; } diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h index b699479d3d4b..c572e0d159a6 100644 --- a/dp/wifi3.0/dp_types.h +++ b/dp/wifi3.0/dp_types.h @@ -3001,6 +3001,7 @@ struct dp_rx_fst { qdf_event_t cmem_resp_event; bool flow_deletion_supported; bool fst_in_cmem; + bool pm_suspended; }; #endif /* WLAN_SUPPORT_RX_FISA */