[PATCH 15/16] usb: gadget: fastboot: use correct max packet size
peng.fan at nxp.com
peng.fan at nxp.com
Wed Sep 16 15:25:36 CEST 2020
From: Li Jun <jun.li at nxp.com>
Change to use wMaxPacketSize of current speed EP desc for request
length wrap up.
Reviewed-by: Peter Chen <peter.chen at nxp.com>
Signed-off-by: Li Jun <jun.li at nxp.com>
Signed-off-by: Peng Fan <peng.fan at nxp.com>
---
drivers/usb/gadget/f_fastboot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index c2abdd66a8..2ef75a1388 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;
--
2.28.0
More information about the U-Boot
mailing list