aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Jun <jun.li@nxp.com>2021-01-25 21:43:59 +0800
committerMarek Vasut <marex@denx.de>2021-01-31 14:08:56 +0100
commit27c9141b1114fd5721437abbb1c694e45e765f19 (patch)
tree69132d5a218fc69f0d61c48a8be5351e937943ca
parent54b22f409cdaaeb3f312a3afcfaddf2fd184209b (diff)
downloadu-boot-27c9141b1114fd5721437abbb1c694e45e765f19.zip
u-boot-27c9141b1114fd5721437abbb1c694e45e765f19.tar.gz
u-boot-27c9141b1114fd5721437abbb1c694e45e765f19.tar.bz2
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>
-rw-r--r--drivers/usb/gadget/f_fastboot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index f3ce47a..950cc11 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;