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

Commit dfeab386 authored by Pratham Pratap's avatar Pratham Pratap Committed by Gerrit - the friendly Code Review server
Browse files

usb: gadget: f_cdev: Send zero length packets in modem data calls



The USB protocol requires zero length packets to be sent when the data
transmission ends on a USB packet size boundary. This fix enables sending
zero length packets when required.

Change-Id: I0269ec7ff25c82000f2a5bc4adb449bc0231c66c
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent 6c21ab56
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1251,6 +1251,7 @@ ssize_t f_cdev_write(struct file *file,
		ret = -EFAULT;
	} else {
		req->length = xfer_size;
		req->zero = 1;
		ret = usb_ep_queue(in, req, GFP_KERNEL);
		if (ret) {
			pr_err("EP QUEUE failed:%d\n", ret);