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

Commit 42cae30d authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 343ff3c9 0866f292
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1384,6 +1384,12 @@ mtp_function_bind(struct usb_configuration *c, struct usb_function *f)
	dev->cdev = cdev;
	mtp_log("dev: %pK\n", dev);

	/* ChipIdea controller supports 16K request length for IN endpoint */
	if (cdev->gadget->is_chipidea && mtp_tx_req_len > 16384) {
		mtp_log("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)