diff options
author | Thinh Nguyen <Thinh.Nguyen@synopsys.com> | 2018-07-28 03:52:41 +0200 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-07-30 09:39:20 +0200 |
commit | 4ea438da76f4277627347147f6f7004affae07b9 (patch) | |
tree | f113b949e10d06e8be0304986e8f2e29dbd44fa6 /drivers/usb | |
parent | usb: dwc2: Turn on uframe_sched on "stm32f4x9_fsotg" platforms (diff) | |
download | linux-4ea438da76f4277627347147f6f7004affae07b9.tar.xz linux-4ea438da76f4277627347147f6f7004affae07b9.zip |
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>
Diffstat (limited to 'drivers/usb')
-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, req->request.short_not_ok, req->request.no_interrupt); } else if (req->request.zero && req->request.length && - (IS_ALIGNED(req->request.length,dep->endpoint.maxpacket))) { + (IS_ALIGNED(req->request.length, maxp))) { struct dwc3 *dwc = dep->dwc; struct dwc3_trb *trb; |