diff options
author | Thinh Nguyen <Thinh.Nguyen@synopsys.com> | 2018-07-27 21:52:41 -0400 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-07-30 03:39:20 -0400 |
commit | 4ea438da76f4277627347147f6f7004affae07b9 (patch) | |
tree | f113b949e10d06e8be0304986e8f2e29dbd44fa6 | |
parent | f8781d55099026061f8b03f2636c0b192f5093e2 (diff) |
usb: dwc3: gadget: Check MaxPacketSize from descriptor
endpoint->maxpacket is not updated after setting the
usb_set_maxpacket_limit() on endpoint enable. The MaxPacketSize can be
different than the endpoint->maxpacket_limit.
DWC3 has been consistently using MaxPacketSize from the endpoint's
descriptor, so let's keep it consistent and use the MaxPacketSize from
the endpoint's descriptor instead.
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 69bf137aab37..032ea7d709ba 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c | |||
@@ -1121,7 +1121,7 @@ static void dwc3_prepare_one_trb_linear(struct dwc3_ep *dep, | |||
1121 | req->request.short_not_ok, | 1121 | req->request.short_not_ok, |
1122 | req->request.no_interrupt); | 1122 | req->request.no_interrupt); |
1123 | } else if (req->request.zero && req->request.length && | 1123 | } else if (req->request.zero && req->request.length && |
1124 | (IS_ALIGNED(req->request.length,dep->endpoint.maxpacket))) { | 1124 | (IS_ALIGNED(req->request.length, maxp))) { |
1125 | struct dwc3 *dwc = dep->dwc; | 1125 | struct dwc3 *dwc = dep->dwc; |
1126 | struct dwc3_trb *trb; | 1126 | struct dwc3_trb *trb; |
1127 | 1127 | ||