]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - drivers/usb/dwc2/gadget.c
usb: dwc2: gadget: fix zero length packet transfers
authorMian Yousaf Kaukab <yousaf.kaukab@intel.com>
Fri, 9 Jan 2015 12:38:59 +0000 (13:38 +0100)
committerFelipe Balbi <balbi@ti.com>
Mon, 12 Jan 2015 21:34:08 +0000 (15:34 -0600)
commitf71b5e2533debe564f21c068aaabc42c6293d18b
tree9424399d8b8c67f8394bc00c59f4828e167d569f
parentfe0b94abcdf6d80bd575e91baf1e0f85a4978d49
usb: dwc2: gadget: fix zero length packet transfers

According to programming guide, zero length packet should be
programmed on its own and should not be counted in DIEPTSIZ.PktCnt
with other packets.

For ep0, this is the zlp for DATA IN stage (if required) and not for
the STATUS stage.

Tested-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Gregory Herrero <gregory.herrero@intel.com>
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc2/gadget.c