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

Commit d7842ded authored by Arun Kumar Neelakantam's avatar Arun Kumar Neelakantam Committed by Gerrit - the friendly Code Review server
Browse files

qrtr: mhi-dev: Wait for RX channel to be enumerated



Registering only for endpoint RX channel to complete enumeration and
starting to open both RX/TX channels leads to race condition on TX channel.
Since the host does TX followed by RX init.

Wait for endpoint TX channel init to synchronise with host.

commit qrtr: mhi-dev: Wait for RX channel to be enumerated
(5593a67ad0546).

Change-Id: Ied002a89b51f71fa30cb7557f7dce27cfe1fd202
Signed-off-by: default avatarSricharan R <sricharan@codeaurora.org>
Signed-off-by: default avatarArun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: default avatarManoharan Vijaya Raghavan <mraghava@codeaurora.org>
parent 74ac2ceb
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -223,8 +223,11 @@ static int qrtr_mhi_dev_probe(struct platform_device *pdev)
	mutex_init(&qep->out_lock);
	init_completion(&qep->out_tre);
	qep->ep.xmit = qrtr_mhi_dev_send;
	/* HOST init TX first followed by RX, so register for endpoint TX
	 * which makes both channel ready by checking one channel state.
	 */
	rc = mhi_register_state_cb(qrtr_mhi_dev_state_cb, qep,
				   QRTR_MHI_DEV_IN);
				   QRTR_MHI_DEV_OUT);
	if (rc)
		return rc;