diff options
author | Li Jun | 2021-01-25 21:43:59 +0800 |
---|---|---|
committer | Marek Vasut | 2021-01-31 14:08:56 +0100 |
commit | 27c9141b1114fd5721437abbb1c694e45e765f19 (patch) | |
tree | 69132d5a218fc69f0d61c48a8be5351e937943ca /drivers/usb | |
parent | 54b22f409cdaaeb3f312a3afcfaddf2fd184209b (diff) |
usb: gadget: fastboot: use correct max packet size
Change to use wMaxPacketSize of current speed EP desc for request
length wrap up.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/f_fastboot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index f3ce47a0d2a..950cc119495 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -427,7 +427,7 @@ static unsigned int rx_bytes_expected(struct usb_ep *ep) { int rx_remain = fastboot_data_remaining(); unsigned int rem; - unsigned int maxpacket = ep->maxpacket; + unsigned int maxpacket = usb_endpoint_maxp(ep->desc); if (rx_remain <= 0) return 0; |