Sfoglia il codice sorgente

qcacmn: capture return code of pld_force_wake_request_sync

Capture return code of pld_force_wake_request_sync and
print it in case of failure.

Change-Id: Idd5058f4e884f28436a3928caf7350ac9446fabd
CRs-Fixed: 3317698
Yu Wang 2 anni fa
parent
commit
cfdcbfe733
1 ha cambiato i file con 9 aggiunte e 4 eliminazioni
  1. 9 4
      hif/src/pcie/if_pci.c

+ 9 - 4
hif/src/pcie/if_pci.c

@@ -4033,8 +4033,10 @@ int hif_force_wake_request(struct hif_opaque_softc *hif_handle)
 	else
 		timeout = 0;
 
-	if (pld_force_wake_request_sync(scn->qdf_dev->dev, timeout)) {
-		hif_err("force wake request send failed");
+	ret = pld_force_wake_request_sync(scn->qdf_dev->dev, timeout);
+	if (ret) {
+		hif_err("force wake request(timeout %u) send failed: %d",
+			timeout, ret);
 		HIF_STATS_INC(pci_scn, mhi_force_wake_failure, 1);
 		status = -EINVAL;
 		goto release_rtpm_ref;
@@ -4127,6 +4129,7 @@ int hif_force_wake_request(struct hif_opaque_softc *hif_handle)
 	struct hif_softc *scn = (struct hif_softc *)hif_handle;
 	struct hif_pci_softc *pci_scn = HIF_GET_PCI_SOFTC(scn);
 	uint32_t timeout;
+	int ret;
 
 	HIF_STATS_INC(pci_scn, mhi_force_wake_request_vote, 1);
 
@@ -4135,8 +4138,10 @@ int hif_force_wake_request(struct hif_opaque_softc *hif_handle)
 	else
 		timeout = 0;
 
-	if (pld_force_wake_request_sync(scn->qdf_dev->dev, timeout)) {
-		hif_err("force wake request send failed");
+	ret = pld_force_wake_request_sync(scn->qdf_dev->dev, timeout);
+	if (ret) {
+		hif_err("force wake request(timeout %u) send failed: %d",
+			timeout, ret);
 		HIF_STATS_INC(pci_scn, mhi_force_wake_failure, 1);
 		return -EINVAL;
 	}