UPSTREAM: usb: dwc3: gadget: handle request->zero
authorFelipe Balbi <balbi@ti.com>
Wed, 2 Dec 2015 16:06:45 +0000 (10:06 -0600)
committerWu Liang feng <wulf@rock-chips.com>
Sun, 6 Mar 2016 13:31:26 +0000 (21:31 +0800)
commitf8d926f487780d654c3ec05bf0fddf3daf252da4
tree8a01bf3508af41d73e66c743cf18b760885a9b0a
parent00d7b43031f42f8e7d67813408b75adce8bc605a
UPSTREAM: usb: dwc3: gadget: handle request->zero

So far, dwc3 has always missed request->zero
handling for every endpoint. Let's implement
that so we can handle cases where transfer must
be finished with a ZLP.

Note that dwc3 is a little special. Even though
we're dealing with a ZLP, we still need a buffer
of wMaxPacketSize bytes; to hide that detail from
every gadget driver, we have a preallocated buffer
of 1024 bytes (biggest bulk size) to use (and
share) among all endpoints.

Reported-by: Ravi B <ravibabu@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 04c03d10e507052cfce6910ddf34091196e79e1c)

Change-Id: I4dce506b683a9381e73733d09dd03e12364bef1f
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
drivers/usb/dwc3/core.h
drivers/usb/dwc3/gadget.c