Эх сурвалжийг харах

qcacmn: Reap all the available Fw diag logs during suspend

Currently in some cases due to pending Fw diag entries in CE7
UMAC is not able to power down.

So to avoid issues during PCI bus suspend reap all the available
diag events to make sure that diag event ring
is empty before allowing the bus to suspend.

Change-Id: Ie628719e3b75ea97e8220fe2b5db5770148d3c93
CRs-Fixed: 3234478
Amit Mehta 3 жил өмнө
parent
commit
0e921647c0
1 өөрчлөгдсөн 11 нэмэгдсэн , 0 устгасан
  1. 11 0
      hif/src/pcie/if_pci.c

+ 11 - 0
hif/src/pcie/if_pci.c

@@ -2339,6 +2339,17 @@ int hif_pci_bus_suspend(struct hif_softc *scn)
 		return -EBUSY;
 	}
 
+	/*
+	 * In an unlikely case, if draining becomes infinite loop,
+	 * it returns an error, shall abort the bus suspend.
+	 */
+	ret = hif_drain_fw_diag_ce(scn);
+	if (ret) {
+		hif_err("draining fw_diag_ce goes infinite, so abort suspend");
+		hif_apps_irqs_enable(GET_HIF_OPAQUE_HDL(scn));
+		return -EBUSY;
+	}
+
 	/* Stop the HIF Sleep Timer */
 	hif_cancel_deferred_target_sleep(scn);