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

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

Merge "usb: f_mtp: Limit MTP Tx req length to 16k for ChipIdea"

parents 437798cd 8907150d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1415,6 +1415,12 @@ mtp_function_bind(struct usb_configuration *c, struct usb_function *f)
	dev->cdev = cdev;
	DBG(cdev, "mtp_function_bind dev: %pK\n", dev);

	/* ChipIdea controller supports 16K request length for IN endpoint */
	if (cdev->gadget->is_chipidea && mtp_tx_req_len > 16384) {
		DBG(cdev, "Truncating Tx Req length to 16K for ChipIdea\n");
		mtp_tx_req_len = 16384;
	}

	/* allocate interface ID(s) */
	id = usb_interface_id(c, f);
	if (id < 0)