diff options
| author | Pratham Pratap <prathampratap@codeaurora.org> | 2018-06-04 10:18:25 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-06-13 02:02:42 -0700 |
| commit | 293a3d1734aa68b1d1863bc3aa6e52de7a2b0920 (patch) | |
| tree | 43ccf70b1dd25fd8f02f464c0afbffcdd4cce4e1 /drivers/usb | |
| parent | c9dc859c2caa860d86101d11ab7ff75a31042a10 (diff) | |
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: Pratham Pratap <prathampratap@codeaurora.org>
Diffstat (limited to 'drivers/usb')
| -rw-r--r-- | drivers/usb/gadget/function/f_cdev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/f_cdev.c b/drivers/usb/gadget/function/f_cdev.c index 34ec15ab9010..233221fed424 100644 --- a/drivers/usb/gadget/function/f_cdev.c +++ b/drivers/usb/gadget/function/f_cdev.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013-2017, The Linux Foundation. All rights reserved. + * Copyright (c) 2011, 2013-2018, The Linux Foundation. All rights reserved. * Linux Foundation chooses to take subject only to the GPLv2 license terms, * and distributes only under these terms. * @@ -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); |
