Hi Peng, On Tue, Jun 29, 2021 at 10:27:27AM +0800, Peng Fan (OSS) wrote: > Maxime > > On 2021/6/25 21:05, Maxime Ripard wrote: > > This reverts commit 27c9141b1114fd5721437abbb1c694e45e765f19. > > --- > > 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 8ba55aab9f8f..1fcffaf9dd26 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 = usb_endpoint_maxp(ep->desc); > > + unsigned int maxpacket = ep->maxpacket; > > Have you ever checked what's the value here of ep->maxpacket and > usb_endpoint_maxp(ep->desc); in your failure case?
ep->maxpacket is 512, usb_endpoint_maxp(ep->desc) is 18277. It might just be that there's a bug somewhere else that is covered by the fact that we wouldn't get any transfer longer than 512 with ep->maxpacket. Is there a way to send USB data of arbitrary size without using fastboot? Maxime