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

Commit 19610c63 authored by Mayank Rana's avatar Mayank Rana
Browse files

usb: gsi: Capture USB GSI endpoint operations



In some cases it has been observed that after sending STARTXFER
command with USB GSI IN endpoint, USB controller is accessing zero
address resulting into bus error. This change captures USB GSI
operation sequence in debug buffer which may help to understand
race condition in terms of USB gadget events and USB GSI endpoint
operations.

Change-Id: Ia46877bb92ea0cc1d5f3712e5c70bb44232d5cfe
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 8c2f9c7a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -286,6 +286,7 @@ static int ipa_connect_channels(struct gsi_data_port *d_port)
	struct ipa_req_chan_out_params ipa_in_channel_out_params;
	struct ipa_req_chan_out_params ipa_out_channel_out_params;

	log_event_dbg("%s: USB GSI IN OPS", __func__);
	usb_gsi_ep_op(d_port->in_ep, &d_port->in_request,
		GSI_EP_OP_PREPARE_TRBS);
	usb_gsi_ep_op(d_port->in_ep, &d_port->in_request,
@@ -297,6 +298,8 @@ static int ipa_connect_channels(struct gsi_data_port *d_port)
	gsi_channel_info.ch_req = &d_port->in_request;
	usb_gsi_ep_op(d_port->in_ep, (void *)&gsi_channel_info,
			GSI_EP_OP_GET_CH_INFO);

	log_event_dbg("%s: USB GSI IN OPS Completed", __func__);
	in_params->client =
		(gsi->prot_id != IPA_USB_DIAG) ? IPA_CLIENT_USB_CONS :
						IPA_CLIENT_USB_DPL_CONS;
@@ -325,6 +328,7 @@ static int ipa_connect_channels(struct gsi_data_port *d_port)
		gsi_channel_info.depcmd_hi_addr;

	if (d_port->out_ep) {
		log_event_dbg("%s: USB GSI OUT OPS", __func__);
		usb_gsi_ep_op(d_port->out_ep, &d_port->out_request,
			GSI_EP_OP_PREPARE_TRBS);
		usb_gsi_ep_op(d_port->out_ep, &d_port->out_request,
@@ -336,7 +340,7 @@ static int ipa_connect_channels(struct gsi_data_port *d_port)
		gsi_channel_info.ch_req = &d_port->out_request;
		usb_gsi_ep_op(d_port->out_ep, (void *)&gsi_channel_info,
				GSI_EP_OP_GET_CH_INFO);

		log_event_dbg("%s: USB GSI OUT OPS Completed", __func__);
		out_params->client = IPA_CLIENT_USB_PROD;
		out_params->ipa_ep_cfg.mode.mode = IPA_BASIC;
		out_params->teth_prot = gsi->prot_id;