aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-13 12:11:40 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-13 12:11:40 +0100
commit845f081002eebd7a1216fc0a5ef2c862dc6d093e (patch)
tree41f5ee3829836aafc4d872edf2c2e22390ae6034 /drivers/usb/dwc3
parentusbip: Fix unsafe unaligned pointer usage (diff)
parentLinux 5.5-rc6 (diff)
downloadlinux-dev-845f081002eebd7a1216fc0a5ef2c862dc6d093e.tar.xz
linux-dev-845f081002eebd7a1216fc0a5ef2c862dc6d093e.zip
Merge 5.5-rc6 into usb-next
We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/gadget.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 0c960a97ea02..154f3f3e8cff 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2467,6 +2467,13 @@ static int dwc3_gadget_ep_reclaim_trb_linear(struct dwc3_ep *dep,
static bool dwc3_gadget_ep_request_completed(struct dwc3_request *req)
{
+ /*
+ * For OUT direction, host may send less than the setup
+ * length. Return true for all OUT requests.
+ */
+ if (!req->direction)
+ return true;
+
return req->request.actual == req->request.length;
}