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

Commit a8eeb669 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: ECM: Add support for ECM over DWC3 controller"

parents ab78d945 326f421a
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -608,6 +608,16 @@ static int ecm_qc_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
					return PTR_ERR(net);
			}

			if (ecm->xport == USB_GADGET_XPORT_BAM2BAM_IPA &&
			    gadget_is_dwc3(cdev->gadget)) {
				if (msm_ep_config(ecm->port.in_ep) ||
				    msm_ep_config(ecm->port.out_ep)) {
					pr_err("%s: ep_config failed\n",
						__func__);
					goto fail;
				}
			}

			if (ecm_qc_bam_connect(ecm))
				goto fail;
		}
+10 −4
Original line number Diff line number Diff line
@@ -264,7 +264,9 @@ static void bam2bam_data_connect_work(struct work_struct *w)
				__func__, ret);
			return;
		}
		if (d->func_type == USB_FUNC_RNDIS && gadget_is_dwc3(gadget)) {
		if ((d->func_type == USB_FUNC_RNDIS ||
			d->func_type == USB_FUNC_ECM) &&
			gadget_is_dwc3(gadget)) {
			u8 idx;
			struct usb_bam_data_connect_info bam_info;

@@ -301,7 +303,9 @@ static void bam2bam_data_connect_work(struct work_struct *w)
				__func__, ret);
			return;
		}
		if (d->func_type == USB_FUNC_RNDIS && gadget_is_dwc3(gadget)) {
		if ((d->func_type == USB_FUNC_RNDIS ||
			d->func_type == USB_FUNC_ECM)
			&& gadget_is_dwc3(gadget)) {
			u8 idx;
			struct usb_bam_data_connect_info bam_info;

@@ -403,7 +407,8 @@ static void bam2bam_data_connect_work(struct work_struct *w)
	d->rx_req->length = 0;
	d->rx_req->no_interrupt = 1;

	if (d->func_type == USB_FUNC_RNDIS && gadget_is_dwc3(gadget)) {
	if ((d->func_type == USB_FUNC_RNDIS || d->func_type == USB_FUNC_ECM)
		&& gadget_is_dwc3(gadget)) {
		sps_params = MSM_SPS_MODE | MSM_DISABLE_WB | MSM_PRODUCER |
			d->src_pipe_idx;
		d->rx_req->length = 32*1024;
@@ -421,7 +426,8 @@ static void bam2bam_data_connect_work(struct work_struct *w)
	d->tx_req->length = 0;
	d->tx_req->no_interrupt = 1;

	if (d->func_type == USB_FUNC_RNDIS && gadget_is_dwc3(gadget)) {
	if ((d->func_type == USB_FUNC_RNDIS || d->func_type == USB_FUNC_ECM)
		&& gadget_is_dwc3(gadget)) {
		sps_params = MSM_SPS_MODE | MSM_DISABLE_WB | d->dst_pipe_idx;
		d->tx_req->length = 32*1024;
	} else