From 3d15529d3efa8eb175b43ef4f9d7af45d164633e Mon Sep 17 00:00:00 2001 From: Arun Kumar Khandavalli Date: Sun, 28 Jun 2020 11:37:18 +0530 Subject: [PATCH] qcacld-3.0: Defer recovery cleanup to shutdown As part of the firmware down notification if the indication comes in the non-interrupt context the driver flushes the idle timeout work and purges the shutdown down notifier. If the the idletimeout is already running, as part of the idletimeout work the platform,mhi irq's will also be freed, if the firmware crashes and enters the RDDM mode during this time, platform driver will notify the host through the uevent. Since free_irq waits for all the pending interrupts to be serviced resulting in the deadlock. Dont flush the work for the pci bus so the interrupt could be completed and free irq could also be unblocked. Change-Id: I4e106ff774fa90544ba97737a87682f42f9288df CRs-Fixed: 2720348 --- core/hdd/src/wlan_hdd_driver_ops.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index aa4b67a6b639..e87f867bbe93 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -1786,6 +1786,9 @@ wlan_hdd_pld_uevent(struct device *dev, struct pld_uevent_data *event_data) { struct qdf_notifer_data hang_evt_data; enum qdf_hang_reason reason = QDF_REASON_UNSPECIFIED; + uint8_t bus_type; + + bus_type = pld_get_bus_type(dev); switch (event_data->uevent) { case PLD_FW_DOWN: @@ -1803,7 +1806,7 @@ wlan_hdd_pld_uevent(struct device *dev, struct pld_uevent_data *event_data) * thus defer the cleanup to be done during * hdd_soc_recovery_shutdown */ - if (qdf_in_interrupt()) + if (qdf_in_interrupt() || bus_type == PLD_BUS_TYPE_PCIE) break; hdd_soc_recovery_cleanup();