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

Commit 053c65f4 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: f_gsi: Use SW path for ECM if RMNET_V2X is bound"

parents 26f263f9 cc790b45
Loading
Loading
Loading
Loading
+12 −14
Original line number Diff line number Diff line
@@ -535,7 +535,6 @@ static int ipa_connect_channels(struct gsi_data_port *d_port)
{
	int ret;
	struct f_gsi *gsi = d_port_to_gsi(d_port);
	struct f_gsi *gsi_rmnet_v2x = __gsi[USB_PROT_RMNET_V2X_IPA];
	struct ipa_usb_xdci_chan_params *in_params =
				&d_port->ipa_in_channel_params;
	struct ipa_usb_xdci_chan_params *out_params =
@@ -665,19 +664,16 @@ static int ipa_connect_channels(struct gsi_data_port *d_port)
	}

	/*
	 * When both RmNet LTE and V2X instances are enabled in a composition,
	 * set 'is_sw_path' flag to true for LTE, so that IPA can ignore the
	 * dummy address for GEVENTCOUNT register.
	 * Set 'is_sw_path' flag to true for functions using normal EPs so that
	 * IPA can ignore the dummy address for GEVENTCOUNT register.
	 */
	in_params->is_sw_path = false;
	if (gsi->prot_id == USB_PROT_RMNET_IPA &&
	    gsi_rmnet_v2x->function.fs_descriptors)
	if (!d_port->in_ep->ep_intr_num)
		in_params->is_sw_path = true;

	if (d_port->out_ep) {
		out_params->is_sw_path = false;
		if (gsi->prot_id == USB_PROT_RMNET_IPA &&
		    gsi_rmnet_v2x->function.fs_descriptors)
		if (!d_port->out_ep->ep_intr_num)
			out_params->is_sw_path = true;
	}

@@ -2509,15 +2505,16 @@ static int gsi_set_alt(struct usb_function *f, unsigned int intf,

			/*
			 * Configure EPs for GSI. Note that when both RmNet LTE
			 * and V2X instances are enabled in a composition,
			 * configure HW accelerated EPs for V2X instance and
			 * normal EPs for LTE.
			 * (or ECM) and RmNet V2X instances are enabled in a
			 * composition, configure HW accelerated EPs for V2X
			 * instance and normal EPs for LTE (or ECM).
			 */
			if (gsi->d_port.in_ep &&
				gsi->prot_id <= USB_PROT_RMNET_V2X_IPA) {
				if (gsi->prot_id == USB_PROT_DIAG_IPA)
					gsi->d_port.in_ep->ep_intr_num = 3;
				else if (gsi->prot_id == USB_PROT_RMNET_IPA &&
				else if ((gsi->prot_id == USB_PROT_RMNET_IPA ||
					 gsi->prot_id == USB_PROT_ECM_IPA) &&
					 gsi_rmnet_v2x->function.fs_descriptors)
					gsi->d_port.in_ep->ep_intr_num = 0;
				else
@@ -2529,7 +2526,8 @@ static int gsi_set_alt(struct usb_function *f, unsigned int intf,

			if (gsi->d_port.out_ep &&
				gsi->prot_id <= USB_PROT_RMNET_V2X_IPA) {
				if (gsi->prot_id == USB_PROT_RMNET_IPA &&
				if ((gsi->prot_id == USB_PROT_RMNET_IPA ||
				     gsi->prot_id == USB_PROT_ECM_IPA) &&
				     gsi_rmnet_v2x->function.fs_descriptors)
					gsi->d_port.out_ep->ep_intr_num = 0;
				else