Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e0554f1 authored by Gauri Joshi's avatar Gauri Joshi
Browse files

msm: mhi-dev: Block the adb read when mhi is in suspend



Adb client on device expects a blocking read from mhi. While mhi
is in suspend, it is returning with an error value. This is
causing the adb client to spawn every 1ms causing error code to
flood the serial logs. If mhi is in suspend and adb client tries
to poll for data, remove the read request from the list to block
the read.

Change-Id: Idaa70568cbddaf6b99fb5c6722a4da594d3e066d
Signed-off-by: default avatarGauri Joshi <gaurjosh@codeaurora.org>
parent c30dc7b7
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -874,6 +874,15 @@ static int mhi_uci_read_async(struct uci_client *uci_handle, int *bytes_avail)
	if (*bytes_avail < 0) {
		uci_log(UCI_DBG_ERROR, "Failed to read channel ret %dlu\n",
			*bytes_avail);
		if (uci_handle->in_chan == MHI_CLIENT_ADB_OUT) {
			uci_log(UCI_DBG_ERROR,
				"Read failed CH 36 free req from list\n");
			uci_handle->pkt_loc = NULL;
			uci_handle->pkt_size = 0;
			mhi_uci_put_req(uci_handle, ureq);
			*bytes_avail = 0;
			return ret_val;
		}
		mhi_uci_put_req(uci_handle, ureq);
		return -EIO;
	}